Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msbuild error in rc011: Illegal characters in path #1915

Closed
lt-gerjan opened this issue May 7, 2018 · 7 comments
Closed

Msbuild error in rc011: Illegal characters in path #1915

lt-gerjan opened this issue May 7, 2018 · 7 comments

Comments

@lt-gerjan
Copy link

lt-gerjan commented May 7, 2018

Sorry for the short description with no repro, I just ran into this problem at work. I hope I can add more info tonight

I just upgraded to rc011 and I'm getting the following error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(283,5): error MSB4184: The expression "[System.IO.Path]::Combine(D:\Git\Path1, D:\Git\Path2" /p:Configuration=Release /p:TargetFrameworkVersion=v4.6.1 /p:Platform=AnyCPU\)" cannot be evaluated. Illegal characters in path. [D:\Git\Project.csproj]

The msbuild call is:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe D:\Git\Project.csproj /m /v:q /p:RestorePackages="False" /p:PreBuildEvent="" /p:PostBuildEvent="" /p:TreatWarningsAsErrors="true" /p:LangVersion="7" /p:OutputPath="D:\Git\Output\\\" /p:Configuration="Release" /p:TargetFrameworkVersion="v4.6.1" /p:Platform="AnyCPU"

Rollback to rc008 solves it

My guess it has something to do with the tripple slash in /p:OutputPath

@matthid
Copy link
Member

matthid commented May 7, 2018 via email

@tobhofmann
Copy link

I have the same problem with rc011. Msbuild does not like triple slashes in OutputPath. An error MSB4184 (Path.Combine related) is thrown.

Target.create "BuildNetTest" ( fun _ ->
    let projFile = @"D:\fake\SomeProject.csproj"
    let publishLocalDir = @"D:\fake\bin"

    let buildMode = Environment.environVarOrDefault "buildMode" "Release"
    let setParams (defaults: MSBuildParams) =
        { defaults with
            Verbosity = Some(Quiet)
            Targets = ["Build"]
            Properties =
                [
                    "Optimize", "True"
                    "DebugSymbols", "False"
                    "Configuration", buildMode
                    "DebugType", "none"
                ]
         }
    [projFile] |> Fake.DotNet.MSBuild.runRelease setParams publishLocalDir "Build" |> ignore
)

@lt-gerjan
Copy link
Author

lt-gerjan commented May 8, 2018

I think #1905 is the problem

@matthid
Copy link
Member

matthid commented May 8, 2018

/cc @JarnoNijboer

@sliepie
Copy link
Contributor

sliepie commented May 8, 2018

Running msbuild with same parameters on cmd line, triggers same error. Removing a slash fixes it.
Should be fixed in #1918

matthid added a commit that referenced this issue May 9, 2018
@Cawifre
Copy link

Cawifre commented May 25, 2018

This may cause a regression of #869. Why wouldn't trimSeperator have actually trimmed the separator? If we're ending up with \\\ after appending \\ to the output of trimSeperator, doesn't that indicate a problem?

@matthid
Copy link
Member

matthid commented May 25, 2018

@Cawifre Are you saying that you have a problem with latest? Can you open a new issue?

please include an example showing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants