How can I clean the publish folder so a DLL doesn't keep getting copied to my website? - c#

When building my solution, the most recent (v6.2.1) RabbitMQ.Client.dll ends up here:
C:\inetpub\wwwroot\MyProject\RabbitMQ.Client.dll
I don't want that version. I referenced the latest RabbitMQ.Client.dll DLL in a project, by mistake, then undid that and referenced a previous version (v5.1.2), but the new one keeps showing up in wwwroot when building (we have a post-build event that publishes).
I cleared the NuGet cache, but it's still happening.
I searched for RabbitMQ.Client.dll in our solution folder and found these, all v6.2.1 (the new one, not what I want), in every one of our projects:
bin\Debug\netcoreapp2.2\publish\RabbitMQ.Client.dll
Is there a way to clear that folder? I'm guessing that's why the wrong version keeps ending up in wwwroot when building/publishing. Running Clean, in VS, doesn't do it.

Just add an automated MSBuild target to every your project's csproj file.
<Target Name="DeletePreviousPublish" BeforeTargets="_CheckForUnsupportedTargetFramework">
<RemoveDir Directories="$(PublishUrl.Remove($(PublishDir.LastIndexOf('\'))))"></RemoveDir>
</Target>
If your $(PublishDir) ends with \, you should use $(PublishDir.LastIndexOf('\'))) to make it as a folder so that RemoveDir will work.
If not, just use
<RemoveDir Directories="$(PublishDir)"></RemoveDir>.
And then, when you click Publish button, it will first remove the previous publish folder and generate the new one. It is automatic, so you no longer need to manually delete the folder.
Update 1
It is quite an issue and should be automatic to remove the previous and then use the latest used ones. From a purely vs usage point of view, this is an obvious issue. I have reported the issue on our DC Forum.
You can vote it and add any comments under the link if I did not describe the issue in detail. And hope the Team will fix the issue.
Since the process will take a long time and for now, you have to use my solution to get what you want.

Related

Azure functions fail when creating a blank/empty project in an existing solution

I upgrade to Visual Studio 2017 15.8.1 and am having issues creating an Azure function project. The project I am trying to create is through the template wizard, just a new V1 empty function project.
I receive the following error, which seems to be .net core related.
NETSDK1004 Assets file '\obj\project.assets.json' not
found. Run a NuGet package restore to generate this
file. FunctionApp1 C:\Program Files\dotnet\sdk\2.1.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets 198
Run a NuGet package restore to generate this file.
But my project file states:
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<AzureFunctionsVersion>v1</AzureFunctionsVersion>
</PropertyGroup>
Just to be clear, I do want a 4.6.1 project, not a core one.
I have looked at other answers to this issue but none resolve it. Package reinstall, dotnet restore etc. I get more errors if I select a different template (e.g. HTTP Trigger)
Any ideas?
I thought I had a solution to reboot, then open %temp% and delete all the temporary files in that folder. Then reboot again for good measure and it worked from a blank / empty project, but as soon as I try include this in another solution or move the project it fails.
Seems I have it working now and I'll leave this here in case anyone else has the same.
I did try many many things to resolve, but I believe the crux of my fix was to reboot, then open %temp% and delete all the temporary files in that folder. Then I rebooted again for good measure and it worked from a blank / empty project.
Well that wasted a chunk of my day. I had created a repo in git which had a space in the name. When cloned I ended up with an encoded view of the repo - i.e. a %20 for the space, which appeared in the folder path. Since this was just some demo work I had left it as is instead of tidying it up to a clean namespace.
Turns out if you have a %20 or some other encoded value in your path you will get the NETSDK1004 error. I hope this answer saves someone else some time!

Visual Studio Rebuilds unmodified projects

So, as the title reads, I have a VS2010 solution with ~50 projects in it right now. If I make a change to a "top level" project that nothing references then VS still rebuilds all 50 projects. I'm running Visual Studio 2010 Ultimate without any add-ons. I am using ILMerge to consolidate all of the projects into a single file.
I have verified this by checking the time stamps of the lower level dlls and see that they are indeed rebuilt even though their code wasn't touched.
I've read all responses and comments for:
Visual Studio 2008 keeps rebuilding
Visual studio keeps building everything
Strange VS2010 build glitch occurs in my solution
Reasons for C# projects to rebuild in Visual Studio
But most of them just offer suggestions on unloading projects to speed up build times but nothing concrete as to a fix. I'm trying to figure out why VS thinks these dependent projects need to be rebuilt when they don't and fix it.
I've turned on 'Tools > Options > Projects and Solutions > Build and Run > Only build startup projects and dependencies on run' but with no effect.
Also, if I just rebuild a "mid-level" project that only has 8 (in)direct dependencies then it still builds all 8 projects even though ILMerge isn't invoked and none of the dependent projects have been modified.
Thank you everyone for any insight you may be able to provide.
Added
To test some of the suggestions I created a new WinForms project from scratch. I then created two new projects inside that solution. I copied all of the code and resources (not project file) from my two 'lowest level' projects into the two brand new projects (I did this by dropping the files and folders from Explorer onto the project in Visual Studio).
The lowest project, let's call it B, did not reference any other project. The next project, A, referenced B only. So once I added the required .NET and external assembly references to the projects then the solution would build.
I then had my new WinForm project reference A and did a full build. So the ref chain is:
WinForm -> A -> B
I then modified WinForm only and did a standard build (F6). As before, Visual Studio rebuilt all three projects.
After some systematic eleminiation of source files in project B I found that if I removed my Resources.Designer.cs and Resources.resx (and commented out the code that made use of the .Properties.Resources object of those resources) then a modification of WinForm would no longer rebuild the entire solution and would only rebuild WinForm.
Adding the Resources.resx and Resources.Designer.cs back to project B (but leaving the referenced code commented out so that nothing was making use of the resources) would re-introduce the full build behavior.
To see if perhaps my resource files were corrupted, I deleted them again and then created a new one (via Project Properties -> Resources) and re-added the same resource as before, which was a single Excel file. With this setup the full rebuild would still occur.
I then removed the single resource, but left the resource file in project B. Even with no resources added, but the resource file still in the project, the full (unneeded) rebuild would occur.
It appears that just having a resource file added to a (.NET 3.5) project will cause Visual Studio 2010 to always rebuild that project. Is this a bug or intended/expected behavior?
Thanks all again!
Open Tools - Options, select Projects and Solutions - Build and Run in tree, then set "MSBuild project build output verbosity" to Diagnostic.
This will output the reason for building a project, i.e.
Project 'ReferencedProject' is not up to date. Project item
'c:\some.xml' has 'Copy to Output Directory' attribute set to 'Copy
always'.
or
Project 'MyProject' is not up to date. Input file
'c:\ReferencedProject.dll' is modified after output file
'c:\MyProject.pdb'.
In this case the fix is to copy some.xml only if newer.
Pre and post build events can trigger build as well.
While I don't think this is a fix, it is a workaround that has worked for my situation...
I originally had about 5 projects out of 50 that contained a Resources section. These projects would always be rebuilt and thus anything that they depended on would also be rebuilt. One of those 5 projects was a "base" level library that 48 of the other projects referenced, thus 96% of my project would be rebuilt every time even if it didn't need it.
My workaround was to use dependency injection, interfaces, and a dedicated "Resources" project. Instead of having those 5 projects reference their own Resources object, I created an interface in each project that would supply the desired resources. Then, the classes that needed those resources would require that interface be passed in during their creation in the constructor (constructor injection).
I then created a separate "Resources" project that had an actual Resources section like normal. This project only contained the resources themselves, and a class for each interface that was needed to provide those resources via an interface. This project would reference every other project that had a resource dependency and implement the interface that the project needed.
Finally, in my "Top Level" project which nothing referenced (and where the exe was actually built and my composition root lives) I referenced the "Resources" project, wired up the DI, and away we went.
This means that only two projects (the "Resources" and the "Top Level") will be rebuilt every time, and if I do a partial build (Shift-F6) then they won't get rebuilt at all.
Again, not a great work around, but with 48 projects being built every time a build would take about 3 minutes, so I was losing 30 to 90 minutes a day with needless rebuilds. It took awhile to refactor, but I think it was a good investment.
Here is a simplified diagram. Note that the dependencies from Main.exe to Proj1 and Proj2 are not shown in order to reduce clutter.
With this design, I can do a build of Proj1 or Proj2 without triggering a full rebuild, since they don't have any dependencies on a Resources section. Only Main knows about the Resources implementation.
This happens when a project has a file that doesn't really exist.
The project can't determine if the file was changed (because it's not there) so it rebuilds.
Simply look at all the files in the project, and search for the one that doesn't have an expandable arrow near it.
I had the same issue in VS 2015.
What did the trick for me is:
One project was referencing itself copy in some other project bin (magic, yes). This kind of stuff could be found when switching to diagnostic build output (in build options) and then trying to build projects one by one from the top of projects hierarchy - if you see the project that rebuilds even if nothing has been changed then see it's references.
I've changed all "copy always" files in all projects to "copy if newer". Basically, in all .csproj files replace <CopyToOutputDirectory>Always</CopyToOutputDirectory>
to <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Then I've disabled NTFS tunneling as described in this article with this powershell script:
New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "MaximumTunnelEntries" -Value 0 -PropertyType "DWord"
After that I needed on rebuild and it seems working for now.
In my case the culprit was "Copy Local" setting of a referenced dll set to true and "Copy to Output Directory" setting a file set to Copy always.
For .Net Core Projects, all solutions above are not working.
I've found the solution. In case you are using Visual Studio 2019:
Build the solution twice
Turn on Tools -> Options -> Projects and Solutions -> SDK-Style Projects -> Logging Level -> Verbose
Clear the output window
Build your start project
Inspect the output window. All the string starting with FastUpToDate
You will find some project items that are making your project not up to date.
Fix these issues and try again from step 1. If your fixes are correct, you will achieve Build: 0 succeeded, 0 failed, {n} up-to-date, 0 skipped in the last string of build output.
The MSBuild team is collecting documentation about investigating build incrementality issues here:
https://github.com/Microsoft/MSBuild/wiki/Rebuilding%20when%20nothing%20changed
UPDATED LINK: https://github.com/dotnet/msbuild/blob/main/documentation/wiki/Rebuilding-when-nothing-changed.md
Based on your observations, it sounds like you have projects expressing dependencies to other projects in a way that isn't obvious. It is possible for orphaned dependencies to remain in project files without being apparent in the UI. Have you looked through a misbehaving project file after opening it in a text editor? Checked solution build dependencies?
If you're not able to spot anything, try recreating one of your projects from scratch to see if the new project exhibits the same problem. If the clean project builds correctly, you'll know that you have unwanted dependencies expressed somewhere. As far as I know, these would have to be in the project file(s) or the solution file, unless you have makefiles or other unusual build steps.
Another problem that frequently happens is when some item in your solution has a modified stamp that is in the future. This can happen if you set your clock forward, and then set your clock to the correct time. I had this happen while installing Linux.
In this case you can recursively touch all the files using git bash (yes, in Windows):
find . -exec touch {} \;
I've finally found one more culprit that I had hard time finding by increasing the build log verbosity.
In some cases, MSBuild looks for vc120.pdb in the output folder, and if this file doesn't exist, it will rebuild the entire project. This occurs even if you have disabled debug symbol generation.
The workaround here is to enable debug symbols and let this file get generated, then disable the setting again without deleting the PDB file.
I had this same problem and it turned out to be related to a couple of project that had a copy local reference to a dll in their own output directory.
The key to finding this was having diagnostic output set for the build output, but also knowing what to look for in the log. Searching for: 'not up to date' was the key.
Here is an answer from VS2010 always rebuilds solution?
This issue is solved by changing the project files, cleaning solution,
deleting all bin folders by hand, restarting Visual studio and
rebuilding everything.
I had the same issues with you.
I found that it came from some deleted files.
When I had removed the files from my project, the issues was gone.
Regards.
For this category of build problems setting MSBuild output verbosity to 'diagnostic' is indeed a necessary first step. Most of the time the stated reason for the re-builds would be enough to act upon, BUT occasionally MSBuild would erroneously claim that some files are modified and need to be copied.
If that is the case, you'd need to either disable NTFS tunneling or duplicate your output folder to a new location. Here it is in more words.
I had the problem of Visual Studio rebuilding projects when upgrading from Visual Studio 2015 to 2017 and I add this answer for the benefit of those who might experience similar problems, as it does not seem to be documented anywhere.
In my case, the problem was that all projects in the solution had the same intermediate Output path (obj). The file GeneratedInternalTypeHelper.cs gets generated by all projects containing XAML. Up to Visual Studio 2015, the build process apparently did not check for the file date of this file and thus no problem with it occurred. With VS2017 the file date of this file is checked and because a later project in the build process will overwrite it (with the same content), the earlier project will re-build, re-triggering the later build, ad infinitum.
The solution in this case is to ensure that all projects have differing intermediate output directories, which will make the problem go away.
In my case (mixed C#, C++/CLI and native C++ solution) , some C++ projects were being re-linked even if nothing had changed. I spent ages trying to work out what was happening. In the end I worked out from the "Command Line" option that the PDB output path (option /Fd) could not handle the folder setting $(IntDir). I removed that - an empty value will do the default correctly - and my issue went away.
As others have noticed, a likely reason is that CopyToOutputDirectory is set to Always. This can be fixed simultaneously in all project files by applying the powershell script below:
$folder = "C:\My\Solution\Folder"
$csvFiles = Get-ChildItem $folder *.csproj -rec
foreach ($file in $csvFiles)
{
(Get-Content $file.PSPath -Encoding UTF8 -Raw) |
Foreach-Object { $_ -replace "<CopyToOutputDirectory>Always</CopyToOutputDirectory>", "<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>" } |
Set-Content $file.PSPath -Encoding UTF8 -NoNewline
}
Files that do not exist are a problem and obviously files producing no output as well. That can happen, wenn you have a resource file in a static library. (C++)

Changes are not happening until a rebuild is performed

I have a large windows application.
Recently when I make any change in the source code and run the project normally with or without debug, the changes are not made.
I tried to rebuild it, and everything goes fine,
now every change I made to the source code I have to rebuild the project then run it so that the changes are taking effect.
also I can't debug until I rebuild the solution.
my project is attached to source safe control.
any help is appreciated.
You frequently see this happen when a project gets deselected from the "Current Build Configuration" Dialog in visual studio. Try checking there to see if your project is unchecked. I think you can get to that menu by clicking the dropdown that says Debug/Release, and clicking manage/edit.
This is an old question but I happened to face a similar challenge. Well, for the benefit of someone who may experience the same here is how my problem was solved. I had a multi-project solution where some project depended on the source code from the other projects. Just before giving up and continue with the rebuild thing, I decided to check on the Build Dependencies=>Project Dependencies(Right-Click on the project). I found that the problematic code was from a Class Library that was not part of the dependencies(Unchecked). When I Included the project in the dependencies my problem vanished into thin air.
If you are referencing a .dll whose code is in another project you will need to build the project before the changes are reflected even if both projects are in same solution. sadly there is no running away from it.
Go to your configuration Manager and make sure build checkbox is selected for your project.
other thing you can try is:
Go to tools > Options>> A window will pop up> Under Project and Solutions > select Build and Run
Make sure Before building is set to Save all changes
(Copied from answer by amit dayama at https://stackoverflow.com/a/32820701/3195477)
I have faced the same problem because I have done some unsafe modifications upon the project names and have used find/replace upon the solution. Which resulted in a hidden exception in the android manifest file and exactly at the package name.
I avoid all types of headaches, I have created a new blank project with the desired name and namespaces and then moved the functional files, resource files and then modified static files like manifest and so on.
Never use unsafe method for project data configuration & modification

the source file is different from when the module was built

This is driving me crazy.
I have a rather large project that I am trying to modify. I noticed earlier that when I typed DbCommand, visual studio did not do any syntax highlighting on it, and I am using using System.Data.Common.
Even though nothing was highlighted, the project seemed to be running fine in my browser. So I decided to run the debugger to see if things were really working as they should be.
Every time the class that didn't do the highlighting is called I get the "the source file is different from when the module was built" message.
I cleaned the solution and rebuilt it several times, deleted tmp files, followed all the directions here Getting "The source file is different from when the module was built.", restarted the web server and still it tells me the source files are different when they clearly are not.
I cannot test any of the code I have written today because of this.
How can the source be different than the binary when I just complied
it?
Is there any way to knock some sense into visual studio, or am
I just missing something?
I got this issue running a console app where the source that was different was the source that had the entry-point (static void Main). Deleting the bin and obj directories and doing a full rebuild seemed to correct this, but every time I made a code change, it would go out-of-date again.
The reason I found for this was:
I had checked "Only build startup projects and dependencies on Run" (Tools -> Options -> Projects and Solutions -> Build and Run)
In Configuration Manager, my start-up project didn't have "Build" checked
(For #2 -> accessible via the toolbar under the 'Debug/Release' drop down list.)
I was just having this same problem, my projects were all in the same solution so they were using Project to Project references, so as one changed the others should have been updated. However it was not the case, I tried to build, rebuild, close VS2010, pulled a new copy from our source control. None of this worked, what I finally ended up trying was right clicking on the project and rebuilding each project individually. That updated the .dlls and .pdb files so I could debug through.
The issue here is that your dll and or your pdb files are not in sync.
Follow these steps
Just delete the bin directory from the project where the DLL is generated.
Re-build the project.
Remove reference from the project that make reference to the DLL.
Include again the reference.
Enjoy.
In addition to these answers I had the same issue while replacing new DLLs with old ones because of the wrong path. If you are still getting this error you may not refer the wrong path for the DLLs. Go to IIS manager and click the website which uses your DLLs. On the right window click Advanced Settings and go to path of the Physical Path folder on File Explorer and be sure that you are using this folder to replace your DLLs.
Some things for you to check:
Have you double checked your project references?
Do you have a Visual Studio started web server still running? Check the system tray and look for a page with a cog icon (you may have more than one):
(source: msdn.com)
Right click and close/exit it. You may have more than one. Can you debug your changes now?
Are you running the debug version but have only built the release version (or vice versa)?
Did the compile actually succeed? I know I've clicked through the "there were errors, do you want to continue anyway?" message a couple of times without realising.
With web services, the problem can be caused by using the Visual Studio "View in Browser" command. This places the service's DLL and PDB files in the bin and obj folders. When stepping into the web service from a client, somehow Visual Studio uses the PDB in the bin (or obj) folder, but it uses the DLL in the project's output build folder. There are a couple workarounds:
Try deleting the DLL and PDB files in the web service bin and obj files.
Try clicking "View in Browser" in Visual Studio.
If you previously got the source file mismatch error, Visual Studio might have added the filename to a black list. Check your solution properties. Choose "Common Properties -> Debug Source Files" on the left side of the dialog box. If your web service source files appear in the field "Do not look for these source files", delete them.
Unload the project that has the file that is causing the error.
Reload the project.
Fixed
I just had this issue.
I tried all the above, but only this worked:
delete the .pdb file for the solution.
delete the offending .obj files (for the file being reported out of sync)
build the solution.
This fixed the issue for all builds moving forward for me.
In Visual Studio 2017 deleting the hidden .vs folder in the resolved this issue for me.
This is how I fixed the problem in Visual Studio 2010:
1) Change the 'Solutions Configurations' option from "Debug" to "Release"
2) Start debugging
3) Stop debugging and switch the 'Solutions Configurations' option back to "Debug"
This worked for me. Step 3 is optional - it was working fine when I changed it to "Release" but I wanted to change it back.
My solution:
I had included an existing project from a different solution in a new solution file.
I did not notice that when the existing project was rebuilt, it was putting the final output into the NEW solution's output directory. I had a linker path defined to look into the OLD solution's output directory.
Switching my project to search in the new solution's output directory fixed this issue for me.
I had this problem, and it turns out I was running my console application as a windows application. Switching the output type back to console fixed the issue.
I had the same problem. To fix it I used the "Release Mode" to debug in VS2013. Which is sufficient for me, because I'm working in a node js\c++ addon.
My problem was that I had two projects in my solution. The second one was a test project used to call the first one. I had picked the path to the references from the bin folder's release folder.
So whenever I made a change to the first project's code and rebuilt it, it would update the dlls in the debug folder but the calling project was pointing to the release folder, giving me the error, "the source file is different from when the module was built."
Once I deleted the reference to the main project's dll in the release folder and set it to the dll in the debug folder, the issue went away.
In my case, the #Eliott's answer doesn't work.
To solve this problem I had Exclude/Include From Project my deficient file, andalso Clean and Rebuild the solution.
After these actions, my file with my last modifications and the debugger are restored.
I hope this help.
solution:-
the problem is:-
if your some projects in a solution , refer to some other projects,
then sometimes the dll of some projects, will not update automatically, whenever you build the solution,
some projects will have previous build dlls, not latest dlls
you have to go manually and copy the dll of latest build project into referenced project
I was using Visual Studio 2013 and I had an existing project under source control.
I had downloaded a fresh copy from source control to a new directory.
After making changes to the fresh copy, when building I received the error in question.
My solution:
1) Open Documents\IISExpress\config\applicationhost.config
2) Update virtualDirectory node with directory to the fresh copy and save.
My problem was that I had a webservice in the project and I changed the build path.
Restoring the default build path solved my issue.
I had this same problem and I followed the majority of the guidance in the other answers posted here, nothing seemed to work for me.
I eventually opened IIS and recycled the application pool for my web application. I have IIS version 8.5.9600, I right-clicked my web application, then: Deploy > Recycle > Recycle application pool > OK.
That seems to have fixed it, breakpoints now being hit as expected. I think that doing this along with deleting the bin and obj folders helped my situation.
Good luck!
I know this is an old question but I just had the same problem and wanted to post here in case it helps someone else. I got a new computer and the IT dept merged my old computer with the new one. When I set up TFS, I mapped a different local path than what I was previously using, to an additional internal drive. The old path still existed from the merged data on my hard drive so I could still build and run. My IIS paths were also pointing to the old directory. Once I updated IIS to the correct path, I was able to debug just fine. I also deleted the old directory for good measure.
I also experienced that. I just open the obj folder on the project and then open the debug folder delete the .pdb file and that's all.
This error also happens if you try to make changes to a source file that is not part of the project.
I was debugging a method from a .dll of another one of my projects, where Visual Studio had quite helpfully loaded the source because the .dll had been built on the same machine and it knew the path to the source. Obviously, changing such a file isn't going to do anything unless you rebuild the referenced project.
Delete all breakpoints.
Rebuild.
Done
At Visual Studio 2015, using C++, what fixed for me the the source file is different from when the module was built problem was
restart Visual Studio.
Check if the location you pointed to using mex() in Matlab is correct (contains lib and obj files which are modified to the last date you compiled the library in Visual studio).
If this is not the case:
Make sure you are compiling Visual studio in a mode that saves .lib files :
properties -> Config properties -> General -> Config type -> static library
properties -> Config properties -> General -> Target extension=.lib (instead of exe)
Make sure the output and intermediate directories match the Matlab directory in
properties -> Config properties -> General -> Output directory
properties -> Config properties -> General -> Intermediate directory
I get this issue when debugging sometimes w/ Visual Studio but when the application is served by IIS. (we have to develop in this form for some complicated reasons that have to do with how the original developer setup this project.)
When I change the file and rebuild, that fixes it a lot of the time. I know that sounds silly, but I was just trying to debug some code to see why it's doing something weird when I haven't changed it in a while, and I tried a dozen things from this page, but it was fixed just by changing the file..
In my case, the problem was that the debugger exe path was pointing to a net5.0 bin folder. I am using net6.0, so I should've updated the exe path back when I updated the target framework. Works fine now.
Debug-> start without debugging.
This option worked for me. Hope this helps!

SVN keeps corrupting files with "<<<<<<< .mine", how to fix?

I've got a Visual Studio C# project which is under version control (SVN).
I've always commited and updated the project without any problems. But a couple of hours ago Visual Studio throws the following error when I try to launch/rebuild the project:
Files has invalid value "<<<<<<<
.mine". Illegal characters in path.
I don't know how to fix this problem. What should I do?
That happens when svn encounters a conflict: You changed a file, the file on the server was changed and it cannot (easily) be merged automatically. You need to decide what is the correct solution now.
Subversion just adds the diff into your source file (and creates files next to it, called OriginalName.mine (unchanged) and OriginalName.rsomething (unchanged, server version)).
Fix the conflict and tell subversion that this is resolved.
just delete the obj folder and it will worked fine.
Remove the code that shouldn't be in the file throwing the error and remove the the three files with extensions .mine, .<somerevision> and .<some_other_revision>. svn updated files that now contain 'conflicts' and you need to resolve these conflicts by hand. Usually this means you edited a file, someone else edited the same file and checked in changes and you didn't pay attention when checking out the changed file.
Delete every thing you have in obj folder .
Remove your obj folder from svn version control . Because on every build it get updated and when other developer commit changes to solution SVN is unable to marge obj folder files and raise error
Files has invalid value "<<<<<<< .mine". Illegal characters in path.
Please read the Basic Usage chapter in the subversion book. It has a section about Merging conflicts by hand which explains the conflict markers you're seeing.
Removing the debug folders worked for me (see comment-not answer above).
I got this after moving 12 folders from one section of svn to a new section. So if you get this after moving a project and the error does not point to an actual file, this is likely your issue.
If you have AnkhSVN or VisualSVN installed resolving this is most likely as easy as right clicking the file in the solution explorer and selecting edit conflict.
This will open the changed file in your merge editor. (See Tools->Options->Source Control->Subversion User tools for AnkhSVN). With a good merge tool like the free to use SourceGear DiffMerge or TortoiseMerge, resolving the conflict is just a few mouseclicks away.
I have had this happen on a large scale where the files get marked resolved but the conflict metadata is still there. I wrote a regular expression for visual studio to find these, for instances where it is not feasible to simply revert the changed files.
http://www.codetunnel.com/blog/post/90/ever-merge-with-svn-and-mess-up-when-resolving-conflicts-read-on
I closed the IDE, then deleted the obj folder and restarted the IDE and rebuilt my Code. This worked for me.
Inside your project :
odj folder -> Debug -> project name.csproj.Filelistabsolute.txt(snb.csproj.Filelistabsolute.txt)
Inside the text file
>>>>>>>.mine and >>>>>>>.r150 occurs
to remove the things the program works
1)Just save your local changes whatever u have edited in the file
2)revert the file
3)update it from SVN
4)Paste your local changes
If you are using TortoiseSVN you should have a right click option on the file called Edit Conflicts. This should bring up TortoiseMerge which is able to read those obnoxious notations stuck into the file (really, to break your code so you KNOW there's an issue and don't blindly check it in).
TortoiseMerge will read it properly and present you with a 3-way merge. This was what I was looking for. Although it is true that it does also create the separate .mine and .rxxx and .ryyy files, and there are various manual and command-line ways to deal with all this.
Have a simple solution. just delete all file from debug folder and rebuild the solution, an error display on the screen "There were build errors. Would you like to continue and run the last successful build? click on "Yes" button. Now stop the program and run normally.

Categories

Resources