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.build adds a bad string at the end of properties #2738

Closed
akhansari opened this issue Mar 7, 2023 · 8 comments · Fixed by #2739
Closed

MSBuild.build adds a bad string at the end of properties #2738

akhansari opened this issue Mar 7, 2023 · 8 comments · Fixed by #2739

Comments

@akhansari
Copy link
Contributor

akhansari commented Mar 7, 2023

Description

MSBuild.build adds always a bad string at the end of properties.

Like: /p:foo=bar<fun:quoteString@686>

Repro steps

path
|> MSBuild.build (fun o ->
    { o with
        Properties = [
            "Configuration", "Release"
            "DeployOnBuild", "True"
            "DeployDefaultTarget", "WebPublish"
            "WebPublishMethod", "FileSystem"
            "PublishUrl", __SOURCE_DIRECTORY__ </> "publish" </> name
            "Version", version
        ]
    })

Expected behavior

"C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" MyProject.csproj /m /nodeReuse:False /p:RestorePackages=False /p:Configuration=Release /p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishUrl=publish%5CMyProject /p:Version=1.1.0-beta

Actual behavior

"C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" MyProject.csproj /m /nodeReuse:False /p:RestorePackages=False /p:Configuration=Release /p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishUrl=publish%5CMyProject /p:Version=1.1.0-beta<fun:quoteString@686>

Known workarounds

Add a dummy property at the end.

Related information

  • Windows 11
  • .NET 6
  • FAKE 6
@0x53A
Copy link
Contributor

0x53A commented Mar 10, 2023

The issue is here:

let internal quoteString str =
StringBuilder()
|> StringBuilder.appendQuotedIfNotNull Some str
|> StringBuilder.toText

because appendQuotedIfNotNull works differently than expected. The first parameter gets passed "Some" as a function, which doesn't make any sense.

image

0x53A added a commit to 0x53A/FAKE that referenced this issue Mar 10, 2023
mthierba added a commit to pbi-tools/pbi-tools that referenced this issue Mar 29, 2023
@plainionist
Copy link

This issue is open since months, without fix (which is even available as PR) MsBuild module is effectively unusable.
can one pls merge the PR and release a "hot fix"?
thx

@DanielRowe1
Copy link

DanielRowe1 commented Jan 8, 2024

Is there going to be a release which includes this fix?

@voronoipotato
Copy link
Contributor

@xperiandri @Numpsy are we going to see a release? It would be really helpful if we could get one.

@xperiandri
Copy link
Collaborator

Do we have the release notes file updated?
https://fake.build/guide/contributing.html#Release-Process
If so I'm ready to release.

@Numpsy
Copy link
Contributor

Numpsy commented Jun 2, 2024

Do we have the release notes file updated? https://fake.build/guide/contributing.html#Release-Process If so I'm ready to release.

Does the shortHash function added in #2752 / #2770 need adding to the relase note?

@voronoipotato
Copy link
Contributor

voronoipotato commented Jun 3, 2024

@xperiandri @Numpsy
If its between working code and having notes, I'd say I'd prefer to have a release. Right now my team is pretty confused why they can't use msbuild without some dummy field. If we can update the notes too that sounds neat but we shouldn't let that block us. Let me know if I can help

@xperiandri
Copy link
Collaborator

@Numpsy Let's add that and I release

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

Successfully merging a pull request may close this issue.

7 participants