Comments (6)
Fixed in #9437
With those changes:
Comparing timestamps of inputs and outputs:
Adding UpToDateCheckBuilt outputs:
D:\MyProject\bin\Debug\net8.0\MyProject.dll
D:\MyProject\obj\Debug\net8.0\MyProject.dll
D:\MyProject\obj\Debug\net8.0\MyProject.pdb
D:\MyProject\bin\Debug\net8.0\MyProject.pdb
Adding newest import input:
D:\MyProject\MyProject.csproj
Adding Compile inputs:
D:\MyProject\Class1.cs
Adding UpToDateCheckInput inputs:
D:\MyProject\build\Task.props
No inputs are newer than earliest output 'D:\MyProject\obj\Debug\net8.0\MyProject.pdb' (2024-04-05 12:20:22.680). Newest input is 'D:\MyProject\MyProject.csproj' (2024-04-05 12:20:14.320).
Project is up-to-date.
Up-to-date check completed in 5.4 ms
Specifically, Task.props
is now checked here:
Adding UpToDateCheckInput inputs:
D:\MyProject\build\Task.props
from project-system.
Looks like another case of #9001
from project-system.
Looks like another case of #9001
I think this is unrelated to Build Acceleration.
With project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<Content Include="build/Task.props" Pack="true" PackagePath="build/" />
</ItemGroup>
</Project>
Enabling verbose FUTDC logs and building a few times shows:
Comparing timestamps of inputs and outputs:
Adding UpToDateCheckBuilt outputs:
D:\MyProject\bin\Debug\net8.0\MyProject.dll
D:\MyProject\obj\Debug\net8.0\MyProject.dll
D:\MyProject\obj\Debug\net8.0\MyProject.pdb
D:\MyProject\bin\Debug\net8.0\MyProject.pdb
Adding newest import input:
D:\MyProject\MyProject.csproj
Adding Compile inputs:
D:\MyProject\Class1.cs
No inputs are newer than earliest output 'D:\MyProject\obj\Debug\net8.0\MyProject.pdb' (2024-04-05 09:34:05.631). Newest input is 'D:\MyProject\MyProject.csproj' (2024-04-05 09:33:41.061).
Project is up-to-date.
Up-to-date check completed in 0.6 ms
The Content
item is not checked at all, so therefore changes to it will never trigger a build.
from project-system.
The SDK defines the _GetPackageFiles
target that provides the items we need for this in the VS FUTDC:
Ideally we would condition this on the presence of the GeneratePackageOnBuild
property in the user's project. However we force this property to be false
in design-time builds (to avoid accidentally packaging during such builds):
I cannot think of a better way than always calling this target unconditionally before CollectUpToDateCheckInputDesignTime
, then including items from _PackageFiles
.
from project-system.
Verifying this behavior in the latest int.main and it appears the up-to-date might be broken in the other direction (i.e. unnecessary incremental builds).
Using the same sample project from the original repo, here's the set of actions I took, what I expected to happen, and what actually happened
Step | Action | Expected Result | Actual Result | Expected == Actual |
---|---|---|---|---|
1 | Build / clean build | Build | Build | ✅ |
2 | Build (again) | Up-to-date | Up-to-date | ✅ |
3 | Edit the Task.props file |
|||
4 | Build | Build | Build | ✅ |
5 | Build (again) | Up-to-date | Build | |
6 | Touch csproj (no edits needed; just update timestamp) | |||
7 | Build | Build | Build | ✅ |
8 | Build (again) | Up-to-date | Up-to-date | ✅ |
It seems like when the only reason for the build is a Pack item, the input to output stamp logic is getting messed up. Do something that causes the assembly to be newer than the pack item (step 6 in this case) fixes the issue. I'm also getting the following FUTDC warning, which may be related:
WARNING: Potential build performance issue in 'classlib.csproj'. The project does not appear up-to-date after a successful build: Input UpToDateCheckInput item 'D:\Projects\dotnet-project-system-9433\classlib\build\Task.props' is newer (2024-04-12 11:01:28.399) than earliest output 'D:\Projects\dotnet-project-system-9433\classlib\bin\Debug\net8.0\classlib.dll' (2024-04-12 10:44:33.133), not up-to-date. See https://aka.ms/incremental-build-failure.
from project-system.
Re-opening. We will need to track the package output file as well, and isolate package inputs/outputs separately (probably via FUTDC "sets").
The challenge here will be knowing when GeneratePackageOnBuild
is set, given we force it to false for DTBs.
from project-system.
Related Issues (20)
- Support custom metadata for AvailableItemName HOT 3
- Flaky: New json files in project directories aren't shown in the Solution Explorer consistently HOT 1
- Unexplained warnings while trying to add System.Web reference HOT 3
- Pipeline template updates
- SDL Renewal - March 2024
- Consider adding "send feedback" on property menu in Project Properties UI HOT 1
- Properties page is blank after close and reopen solution while current tab is not Properties page HOT 3
- PackageReference added under Target is not displayed in Dependency Tree HOT 1
- Visual Studio Build Acceleration not respecting "Copy Local" setting on dependencies. HOT 7
- Inconsistent copy of transitive assembly references with FastUpToDate build HOT 4
- Support TargetPath and Link metadata on CopyToOutputDirectory items in Properties window
- Copies performed by the Build Acceleration feature should trigger the PostBuild event HOT 1
- Replace occurrences of AsyncSemaphore with JTF-aware semaphore
- Move to Archive Symbols task v4 for servicing branches
- Update Build Acceleration documentation around opt-in/out
- VS FUTDC is not considering updates to file-based resources HOT 13
- Files linked into ResX files are not checked by the FUTDC HOT 8
- Generation of Application.myapp while Visual Basic Application Framework is disabled HOT 3
- Support for file nesting for legacy projects HOT 6
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 project-system.