You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"C:\GitReposD\OctoPack.Precompile\Source\Test\WebApplication1\WebApplication1\WebApplication1.csproj" (Rebuild target) (2) ->
(OctoPackPrecompile target) ->
C:\GitReposD\OctoPack.Precompile\Source\OctoPack.Precompile.targets(45,24): error MSB4184: The expression ""C:\GitReposD\OctoPack.Precompile\Source\Binaries\roslyn\csc.exe".Substring(77)" cannot be evaluated. startIndex cannot be larger than length of string. Parameter name: startIndex [C:\GitReposD\OctoPack.Precompile\Source\Test\WebApplication1\WebApplication1\WebApplication1.csproj]
The problem is that msbuild command assumes that files have the same prefix as ProjectDir
<!--
Some of the collected file paths are full paths, but we need paths relative to the project so we can perform a recursive copy.
Also it looks like NuGet doesn't like the packages.config inside the packages, so we skip it.
http://help.octopusdeploy.com/discussions/problems/29208-packagesconfig-files-are-excluded-from-packages-created-by-octopack
-->
<NormalizedFiles Include="@(CollectedFiles->'%(FullPath)'->Substring($(ProjectDir.Length)))" Exclude="packages.config" />
Could you please suggest how to change the target to use OutDir (I haven't work with MSBuild for a while)?
We are using msbuild with output to different directory by specifying /p:OutDir="$binariesPath".
&"c:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" WebApplication1.sln /target:Rebuild /p:RunOctoPack=true /p:OutDir="$binariesPath\"
It causes OctoPack.Precompile.targets to fail:
The problem is that msbuild command assumes that files have the same prefix as ProjectDir
Could you please suggest how to change the target to use OutDir (I haven't work with MSBuild for a while)?
You can see full test script in my fork https://github.com/MNF/OctoPack.Precompile/blob/master/Source/Test-OutDir.ps1
The text was updated successfully, but these errors were encountered: