You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In attempting to reproduce the issue for #4217 I attempted to create a fresh WPF Project to see if I could reproduce it; in doing this I encountered a similar (but I do not believe identical) issue wherein the MainWindow.g.cs was always regenerated.
Steps to reproduce
Please find an attached zip file that contains the project that demonstrates this behavior: WpfAppAlwaysRebuilds.zip
This project was created by:
Creating a new WPF Application within Visual Studio
<TargetName="GenerateCompiledExpressionsTempFile">
<!--This is a no-op to overwrite the existing target that ships with MSBuild. When we upgrade to Visual Studio 2019 (MSBuild 16.0) we can remove this. See https://github.com/Microsoft/msbuild/issues/1648-->
</Target>
To reproduce the issue on the command line build the project
msbuild WpfAppAlwaysRebuilds.sln /t:Build
Then launch the Solution in Visual Studio and build you will see this in diganostic verbosity:
Project 'WpfAppAlwaysRebuilds' is not up to date. Input file 's:\temp\markupbug\wpfappalwaysrebuilds\wpfappalwaysrebuilds\obj\debug\mainwindow.g.cs' is modified after output file ''.
------ Build started: Project: WpfAppAlwaysRebuilds, Configuration: Debug Any CPU ------
Note that in order to repeat it a second time you MUST delete the contents of the /obj/ folder to start "clean" again. Once it has built in Visual Studio once MSBuild will happily report that it is up to date.
Expected behavior
The expected behavior is that this project will report as "up-to-date"
Actual behavior
The project rebuilds because it determines that it is not "up-to-date"
Environment data
msbuild /version output:
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
15.9.21.664
OS info:
Windows Server 2012 R2
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
Visual Studio 15.9.8
Background
In attempting to reproduce the issue for #4217 I attempted to create a fresh WPF Project to see if I could reproduce it; in doing this I encountered a similar (but I do not believe identical) issue wherein the MainWindow.g.cs was always regenerated.
Steps to reproduce
Please find an attached zip file that contains the project that demonstrates this behavior: WpfAppAlwaysRebuilds.zip
This project was created by:
To reproduce the issue on the command line build the project
Then launch the Solution in Visual Studio and build you will see this in diganostic verbosity:
Note that in order to repeat it a second time you MUST delete the contents of the /obj/ folder to start "clean" again. Once it has built in Visual Studio once MSBuild will happily report that it is up to date.
Expected behavior
The expected behavior is that this project will report as "up-to-date"
Actual behavior
The project rebuilds because it determines that it is not "up-to-date"
Environment data
msbuild /versionoutput:OS info:
Windows Server 2012 R2
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
Visual Studio 15.9.8