Giter Club home page Giter Club logo

Comments (4)

dotnetshadow avatar dotnetshadow commented on May 22, 2024 1

from msbuildgithash.

MarkPflug avatar MarkPflug commented on May 22, 2024

Thanks for bringing this to my attention. That MSBuildGitHashSuppressDirtyWarning got lost in the 2.0.0 refactor. I just pushed 2.0.1 to nuget which restores this feature.

As far as the second issue, there is no in-built way to turn off MSBuildGitHash, but you can probably do it within your own projects though.
Somewhere in your project you'll have this line: (I'm assuming you are using packageReference and not packages.config)

<ItemGroup>
<PacakageReference Include="MSBuildGitHash" Version="2.0.1"/>
</ItemGroup>

You can add this line later in the file (or in a Directory.Build.targets):

<ItemGroup Condition="'$(BuildingInsideVisualStudio)' == 'true'">
<PacakageReference Remove="MSBuildGitHash"/>
</ItemGroup>

I don't use resharper, so I have no way of testing if this will fix the issue you are seeing. If it does, please let me know so I can add it to a readme for other people who might see the same thing.

from msbuildgithash.

dotnetshadow avatar dotnetshadow commented on May 22, 2024

Thanks for bringing this to my attention. That MSBuildGitHashSuppressDirtyWarning got lost in the 2.0.0 refactor. I just pushed 2.0.1 to nuget which restores this feature.

This is now working thank you very much.

Another Issue
I noticed that the information is not being injected in the file properties, doesn't matter what I try.
I'm building from dotnet cli dotnet build

EDIT I think it was because I was using a preview version of dotnet which got installed because of a the latest visual studio preview. When working with the released version everything works

I can see it being outputed in the console:
image

But the information is missing in the file properties
image

I guess I'm missing how this is supposed to work? Basically I committed, pushed to remote branch. Then I made another update locally and I build the project. Should the file properties change? or only if I publish? Or only in release production mode?

You can add this line later in the file (or in a Directory.Build.targets):

<ItemGroup Condition="'$(BuildingInsideVisualStudio)' == 'true'">
<PacakageReference Remove="MSBuildGitHash"/>
</ItemGroup>

Thanks for this recommendation, I'll see if it helps and report back.

from msbuildgithash.

MarkPflug avatar MarkPflug commented on May 22, 2024

@dotnetshadow Can you clarify if you are still having an issue with the assembly details? Your edit makes it sound like you got this working.

from msbuildgithash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.