Comments (4)
from msbuildgithash.
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.
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:
But the information is missing in the file properties
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.
@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)
- Option for git commit date as additional attribute HOT 1
- The "Exec" task was not given a value for the required parameter "Command" HOT 2
- Deativate Output / Redirect stdout HOT 1
- MSBuildGitHashCommand causes build to fail if there is no .git folder HOT 3
- anyway to disable the AssemblyInformationalVersionAttribute modification HOT 2
- Default hash fails with tags HOT 3
- [Minor] Readme
- Thoughts on Adding Commit Hash Always and a Data Class HOT 5
- AssemblyMetadataAttribute GitHash not in file properties HOT 4
- Update issue 1.0.2 -> 2.0.1 HOT 2
- No informational version with latest .net core version HOT 4
- Change request: A way to conditionally disable MSBuildGitHash HOT 5
- Is MSBuildGitHash not working without network connection? HOT 2
- Multiple commands / outputs HOT 10
- Commit not updated on unrelated changes
- Special character sequences in git commands HOT 1
- Commit not updated if you build from dirty, then commit, then build again HOT 2
- Adding an annotated tag causes build error HOT 1
- The MSBuildGitHash did not work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuildgithash.