The project was not built due to "Could not delete ‘project’." - eclipse

Firstly I take error given below:
An exception has been caught while processing the refactoring 'Delete Source'
After TFS cache is cleared, TFS server mapping is removed, .lock file in eclipse workspace .\metadata file is cleared, then TFS mapping is created, Get latest, Import is applied again and project can be deleted.After this, I pull project from TFS to my local path again in Problems view, error given below is taken:
The project was not built due to "Could not delete ‘project’.". Fix
the problem, then try refreshing this project and building it since it
may be inconsistent
Is my mapping can be incorret( Should I checked "Recursive" while setting mapping path)?
Thanks friends!

This Team Explorer Everywhere plugin enables using Team Foundation Version Control (TFVC) within Eclipse. And it is no longer maintained. It works on the operating system of your choice with Eclipse 4.2 (Juno) - 4.6 (Neon) as described here.
If you are still using this plugin, please follow this doc: Importing Projects from Team Foundation Server to import a project from the server to your Eclipse workspace rather than manually mapping and getting files. Manual mapping and getting is error-prone and can cause unpredictable behavior if you did not choose the correct mappings. Instead, importing can check compatibility issues and prevent Eclipse workspace problems.
In addition, for this particular eclipse issue: “The project was not built due to “Could not delete ‘project’.””, it seems that it is because customer has the workspace in a dropbox sysncing folder like this thread answered.

Related

Visual Studio Online cannot build project due to Entity Framework reference cannot be resolved

What can I do to fix this build? Entity Framework was added to this project via NuGet.
All projects compile without issues on local system. But the build fails on Visual Studio Online.
By turning on Diagnostic logging, I am able to trace to this warning which makes my builds failed:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework.SqlServer". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
DO NOT right-click the project and chose "Enable NuGet Package Restore". This is the "old way" of doing package restores as per the Nuget Docs.
Package restoration should happen as part of the build process by default. If it's not (which seems to be the case), you've got a different problem, but there's not enough information to say what.
I am able to resolve this error simply by right clicking at the solution in Solution Explorer and select Enable NuGet Package Restore.
That adds a few more files to my solution and modify a few project files. The build server can then restore the packages at build time and is happy in the end.

WSO2 Eclipse plugin not working well

I'm using:
Eclipse Kepler
WSO2 Developer Studio v3.2 plugin
WSO2 esb v4.7.0
Maven 3.x
Java 1.7.x
Windows 7
And I'm having the following problems in Eclipse when using WSO2 Development Studio:
if I try to edit a file (via Design or Source view), the changes are not saved and are reverted back to the original values.
when I add a new Registry Resource to my Registry project, this resource is not added to the carbon file.
by deleting a resource file, the resource still exists in the project/Registry(path) and is not cleaned up well. I have to delete it manually from artifact.xml.
when I try to make a carbon file by running 'mvn clean install' from the command line, the build hangs. I've fixed this by changing the version of 'maven-car-plugin, wso2-esb-proxy-plugin, wso2-general-project-plugin' to 2.0.5 (default: 2.0.4).
And changes made to pom files are also not saved, they always revert back to original values.
Are these problems known and is there any solution available ?
Thx in advance and looking forward for a reply.
First of all I need to emphasize that WSO2 Dev Studio 3.2.0 is not tested and verified with Eclipse Kepler and the officially supported Eclipse version is Eclipse Juno SR2. Even-though Kepler is not tested, I do expect most of the features to work.
Following are the answers for your comments/questions:
Q.if I try to edit a file (via Design or Source view), the changes are
not saved and are reverted back to the original values.
Ans: What is the file you are referring here? Is it an artifact file? or an utility file such as pom.xml?
We have not come across this issue before that values are being reverted back to previous. However there is a known behavior that if you try to add a new element/value that is not being recognized by the ESB Editor, it will simply drop the newly added value from the source.But that behavior is specific to ESB Graphical Editor. Without knowing the type of file you are referring, I cannot 100% be sure what is going on.
Q. when I add a new Registry Resource to my Registry project, this
resource is not added to the carbon file.
Ans: Yes, That is the expected behavior. Rationale is that, In a given workspace there can be multiple C-App Projects existing at the same time. So we are not sure to which C-App project user wishes to include a given registry Resource. Adding the same registry resource or any other artifact to all the C-App projects does not seem right. Therefore we do not automatically include a Registry Resource or any other artifact in to C-App projects.
Another special scenario with Registry Resources is that, you can deploy a Registry Resource to any Carbon Server. Therefore we cannot 100% be sure about the correct Server Role for the Registry Resource.
After considering all the above facts we have decided not to include any artifact in to C-App Project and let users to add them.
Q. by deleting a resource file, the resource still exists in the
project/Registry(path) and is not cleaned up well. I have to delete
it manually from artifact.xml.
Ans: This could be due to a bug in the Refactoring component in Dev Studio. However we have done some modifications to the refactor components to improve it and fix some bugs in it for Developer Studio 3.3.0 Alpha 3 version. With those fixes, most of such issues will go away.
Q. when I try to make a carbon file by running 'mvn clean install' from
the command line, the build hangs. I've fixed this by changing the
version of 'maven-car-plugin, wso2-esb-proxy-plugin,
wso2-general-project-plugin' to 2.0.5 (default: 2.0.4).
Ans: There was serious a performance issue related to wso2-general-project-plugin and wso2 esb artifact plugins released with Developer Studio 3.2.0. We have identified this issue [1] and fixed in the latest versions of the plugins as you have discovered. So with those plugins, you will experience a greater performance improvements.
Q. changes made to pom files are also not saved, they always revert back to original values.
Ans: There is a known issue with updating properties section of the pom.xml of C-App project [2] and we are working on fixing this for the upcoming Dev Studio release.
Hope this clarifies some of the concerns you have and provide answers to your queries.
Thanks and Regards,
Harshana

Nuget - Package restore is disabled by default. To give consent, open the Visual Studio Options dialog. (Nuget package restore on a build server)

So, the error I'm getting when my build server builds my project is:
Package restore is disabled by default. To give consent, open the
Visual Studio Options dialog.
I'm aware of what this error means and how to resolve it. The problem is I cannot change anything on the build server - my company won't allow it. Additionally, creating an environment variable called EnableNuGetPackageRestore and setting it to true is not an option because that involves modifying the build server.
My question is: is it possible to simply check all of the NuGet packages that are part of a solution into source control so then the build server won't have any reason to go out and re-download them? If so, then perhaps you could explain why this error is still happening, when I've verified that all of the NuGet packages (.nupkg) are in the packages folder in source control:
Second Question: Forgive my ignorance, but what is the reason for the "package restore" feature? Is it to ensure that each package is up to date with the latest version of that package? It seems to me that this "feature" should be a setting that shouldn't hinder building a project on a build server. In my mind, if we want the build server to look for newer packages, then sure, do it, otherwise if I have all my packages in source control and we tell the build server somehow to NOT look for newer packages, that sounds reasonable to me.
So, my situation specifically was I downloaded the source code for the actual Nuget site (to create an internal implementation of Nuget in my company), and when I tried to deploy it, that's when I got the error above.
What I had to do was:
Delete the .nuget folder.
Within your file system (not via Visual Studio), modify the .csproj files (delete where it said <packageRestore>true</packageRestore>, as well as where it imported the project that had nuget.targets in the line - just do a "find" for "nuget.targets", and delete all lines that have an import.
Save your .csproj file changes.
Check in your changes into TFS.
Deploy your solution.

Duplication of resource folders within an Eclipse Project

I am writing an Eclipse Plug-in which requires me to add two new configurations to the ManagedProject upon mouse-click on a menu option. I basically runs on Android projects that has Native Support Added to it. I am trying to achieve this using ManagedBuildManager and Configuration classes from the CDT core plug-in interfaces.(org.eclipse.cdt.managedbuilder.core.* package).
To complete the task, I create two new Configurations for the project and run the exportArtifactInfo() method to complete the action. In the end, the configuration gets added but the project folder contains duplicate folders of all the original folders in the Project folder.
I looked up if there is a bug in CDT 4.0 and found that it is indeed a resolved bug.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194395
But I cannot figure out what the actual fix is for this bug. If anyone has encountered and fixed it or knows how to fix this, please point me in the right direction.

Eclipse 3.7/GWT+GAE wizard, resource already exists?

A problem occurs for me when I attempt to use the Google Web Application Wizard in the Eclipse IDE (Running on Mac OSX 10.7). If I attempt to generate a project with any given name/package (using the newest GWT and GAE SDK), without generating the sample code, I get an error stating:
Creation of element failed:
Reason:
Resource '/xxx/war/WEB-INF/web.xml' already exists.
Or alternatively
Reason:
Resource '/xxx/war/WEB-INF/appengine-web.xml' already exists.
The create project process does not finish, and when I exit out, there is a folder with whatever 'xxx' happens to be in the workspace I designated. However it only contains a src folder (with no modules or packages) a war folder (with no library, css, or html files), and does not import the .jar files from the SDKs.
If I follow this same process exactly, except allow it to generate sample code, all the files are there. If I follow this process except uncheck use google app engine, all the files are there. However it is this specific procedure that seems to be causing the problem. I would prefer not to have to reinstall Eclipse and all of it's plugins, only to have this happen again, so it would be greatly appreciated if someone could help me identify the source of the problem.
Thanks!
Create the Application as you describe except uncheck "App Engine".
Then turn on GAE via the project's Properties dialog.