[英]Why is my csproj File Changing When I Publish a Solution?
I am using Visual Studio 2015 with Team Foundation Server and Git. 我将Visual Studio 2015与Team Foundation Server和Git一起使用。
Whenever I publish my project with alt
+ b
+ h
I am told that there has been one change in the repo: 每当我用
alt
+ b
+ h
发布项目时,都会告诉我仓库中有一个更改:
When I investigate, I can see that the file that changed is MyProject.csproj
. 当我调查时,可以看到更改的文件是
MyProject.csproj
。
However, upon viewing the changes, I can see that there is literally no difference between the old and new files: 但是,查看更改后,我可以看到新旧文件之间实际上没有区别:
However there does appear to be 2 warnings on this line: 但是,此行上确实有2条警告:
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
Where MSBuildToolsVersion
is highlighted but there is no message. MSBuildToolsVersion
突出显示但没有消息的地方。
I would like to .gitignore
the .csproj
file, but I have read that this should not be done as it may actually change in future. 我想
.gitignore
.csproj
文件,但我读到不要这样做,因为它将来可能会发生实际变化。 Is this true, and is what I am experiencing normal or is this some kind of bug? 这是真的吗?我正在经历正常现象吗?还是某种错误?
number of factors can be: 因素数量可以是:
1) you might have changed the published location path 1)您可能已更改了发布的位置路径
2) you might just build your solution to new or different version than before 2)您可能只是将解决方案构建为比以前更高的版本或新版本
3) you might have published and due to not checked those changes to TFS it is showing you that you have pending check out 3)您可能已经发布,并且由于未检查对TFS所做的更改,因此表明您有待签出
you can always do one thing: go to solution>>source control>>undo pending changes 您总是可以做一件事:前往解决方案>>源代码管理>>撤消未决的更改
after you do this , get latest from TFS and build it 完成此操作后,请从TFS获取最新信息并进行构建
Now see if there is any changes if yes you can always compare what are the changes you made. 现在查看是否有任何更改(如果是),您可以随时比较所做的更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.