MSBUILD : OctoPack error OCT-1676060969: at (XContainer nuSpec, IEnumerable`1 sourceFiles, String sourceBaseDirectory, String targetDirectory, String relativeTo) in Z:\buildAgent\workDir\20ba9f2e0d5e4022\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 443 MSBUILD : OctoPack error OCT-1676060969: at .GetPathRelativeTo(String fullPath, String relativeTo) in Z:\buildAgent\workDir\20ba9f2e0d5e4022\source\OctoPack.Tasks\Util\OctopusPhysicalFileSystem.cs:line 224 MSBUILD : OctoPack error OCT-1676060969: - End of inner exception stack trace. MSBUILD : OctoPack error OCT-1676060969: at .GetPathRelativeTo(String fullPath, String relativeTo) in Z:\buildAgent\workDir\20ba9f2e0d5e4022\source\OctoPack.Tasks\Util\OctopusPhysicalFileSystem.cs:line 211 MSBUILD : OctoPack error OCT-1676060969: at (String uriString) MSBUILD : OctoPack error OCT-1676060969: at (String uri, Boolean dontEscape, UriKind uriKind) ![]() > System.UriFormatException: Invalid URI: The format of the URI could not be determined. See the inner exception for more details. MSBUILD : OctoPack error OCT-1676060969: System.Exception: Failed to build the path for '\bin\roslyn\csc.exe' relative to 'T:\workspace\machine.engine\': Invalid URI: The format of the URI could not be determined. ![]() In my case I have had issue in Jenkins when it tried to deploying it in Octopus with following error: MSBUILD : OctoPack error OCT-1676060969: Failed to build the path for '\bin\roslyn\csc.exe' relative to 'T:\workspace\machine.engine\': Invalid URI: The format of the URI could not be determined. 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. |