![]() In the dedom node, you can see why it was bringing in roslyn: compileroptions="/langversion:6 We had to remove the nuget package which then removed: In my case, similar to basim, there was a nuget package that was telling the compiler we needed c# 6, which we didn't. Start /min xcopy /s /y /r "$(outdir)roslyn\*.*" "$(webprojectoutputdir)\bin\roslyn" If not exist "$(webprojectoutputdir)\bin\roslyn" md "$(webprojectoutputdir)\bin\roslyn" csproj of my offending projects now looks like: after much frustration i decided on a 'hack' fix - an additional post-build task to delete these files from the bin directory, removing the conflict. The reason for this is that as the roslyn files are getting dumped into the main bin directory, when you run the xcopy to recreate them in the nested roslyn folder, you now have 2 copies of these files being compiled and there is a clash between them. exactly the same - the roslyn folder was not in the bin directory, and all the roslyn files were lumped in with the bin 's answer was the only thing that worked for me (as i am using the c# 6 language features, i cannot simply uninstall the nuget packages as per other answers), but as i am also running codeanalysis, i was getting another error on my deployment target server:Īn attempt to override an existing mapping was detected for type with name "", currently mapped to type .compilationunitsyntax, to type .compilationunitsyntax. I experienced this error on a jenkins build server running msbuild, which outputs the build files to a separate folder location (_publishedwebsites). Tools -> options-> nuget package manager->package source-> microsoft visual studio offline packagesĬ:\program files (x86)\microsoft sdks\nugetpackages Try copying this package to offline version Remember this package compile your folder and if its not there you cannot compile anything and so you cannot add anything too. Try uninstall and install of nuget package. \code\website1\bin\roslyn some how that is not happening for you. Now as part of compiling this folder should get copied to your website under bin like this. \code\packages\.2.0.0Ĭan you see code\packages\.2.0.0\tools\roslynlatest in it ![]() Go to your website nuget packages check this folder You should have it in bin folder for these projects it may be rights issue or some execution policy which stops it from copying to bin folder ![]() Nuget package is behaving differently on different machine. The answer for this is different for website project and web application project. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |