Skip to content

Fix .gitignore test failure & build error(s)#54067

Merged
MiYanni merged 6 commits intodotnet:mainfrom
MiYanni:FixLscacheFailure
Apr 26, 2026
Merged

Fix .gitignore test failure & build error(s)#54067
MiYanni merged 6 commits intodotnet:mainfrom
MiYanni:FixLscacheFailure

Conversation

@MiYanni
Copy link
Copy Markdown
Member

@MiYanni MiYanni commented Apr 24, 2026

Related: #53752
Related: #54056

Summary

Test Failure

The recent PR that added .lscache to the .gitignore file. We have a test that runs against the .gitignore file. This test did not run in the PR because CI didn't run in the PR. This PR addresses the test failure and adds the template_feed folder as a folder that is monitored for changes so that CI runs appropriately.

Build Failure 1 (consistent)

For the second PR, it was causing a build error.

##[error].dotnet\sdk\11.0.100-preview.3.26170.106\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1047: (NETCORE_ENGINEERING_TELEMETRY=Build) Assets file 'D:\a\_work\1\s\artifacts\obj\dotnet-aot\project.assets.json' doesn't have a target for 'net11.0/win-x64'. Ensure that restore has run and that you have included 'net11.0' in the TargetFrameworks for your project. You may also need to include 'win-x64' in your project's RuntimeIdentifiers.

I tried to add TargetFramework=$(SdkTargetFramework), but that did not seem to fix the issue. Instead, I've just set the target to no longer run since it is not critical for any SDK functionality yet.

Build Failure 2 (inconsistent)

There was an inconsistent build failure happening.

##[error].dotnet/sdk/11.0.100-preview.3.26170.106/Microsoft.Common.CurrentVersion.targets(4917,5): error MSB3894: (NETCORE_ENGINEERING_TELEMETRY=Build) Got System.IO.IOException: The process cannot access the file '/Users/runner/work/1/s/artifacts/obj/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Release/net10.0/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at Microsoft.Build.Tasks.Copy.CopyFileWithLogging(FileState sourceFileState, FileState destinationFileState)
   at Microsoft.Build.Tasks.Copy.DoCopyWithRetries(FileState sourceFileState, FileState destinationFileState, CopyFileWithState copyFile) copying "/Users/runner/work/1/s/artifacts/obj/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Release/net10.0/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll" to "/Users/runner/work/1/s/artifacts/bin/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Release/net10.0/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll" and HR is 35

Had Copilot take a look. It realized there is a pattern to including projects in the dotnet.csproj. The recently migrated TemplateEngine project, Microsoft.TemplateEngine.Orchestrator.RunnableProjects, did not follow this pattern. It seems GlobalPropertiesToRemove="PublishDir" was missing, so that has been added to the project reference.

…e_feed folder to those required for CI to run.
@MiYanni MiYanni enabled auto-merge April 24, 2026 23:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the dotnet-gitignore-file template approval test after .lscache was added to the gitignore template, and ensures PR CI runs when template feed content changes.

Changes:

  • Update the dotnet-gitignore-file approval .gitignore to include *.lscache.
  • Update .vsts-pr.yml PR path filters to include template_feed/ so CI triggers on template updates.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#dotnet-gitignore-file#-n#item.verified/dotnet-gitignore-file/.gitignore Updates the approved .gitignore output to match the template content (adds *.lscache).
.vsts-pr.yml Expands PR path filters to include template_feed so CI runs for template feed changes.

@MiYanni MiYanni changed the title Fix .gitignore test failure Fix .gitignore test failure & build error Apr 25, 2026
@MiYanni MiYanni changed the title Fix .gitignore test failure & build error Fix .gitignore test failure & build error(s) Apr 25, 2026
MiYanni added 2 commits April 24, 2026 19:16
…ine.Orchestrator.RunnableProjects project reference to avoid build collisions.
@MiYanni MiYanni merged commit 5004443 into dotnet:main Apr 26, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants