Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProjectReference 'HXE' is compiled *twice* #48

Open
BinToss opened this issue Oct 18, 2021 · 2 comments
Open

ProjectReference 'HXE' is compiled *twice* #48

BinToss opened this issue Oct 18, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@BinToss
Copy link
Member

BinToss commented Oct 18, 2021

dotnet publish '.\SPV3.csproj' -r 'win10-x86'
D:\Repos\spv3-loader\src [main ≡ +0 ~4 -0 !]> dotnet publish '.\SPV3.csproj' -r 'win10-x86'
Microsoft (R) Build Engine version 17.0.0-preview-21460-01+8f208e609 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

D:\Repos\spv3-loader\src\SPV3.csproj(3,3): warning MSB4011: "D:\Repos\spv3-loader\src\Directory.Build.props" cannot be imported again. It was already imported at "C:\Program Files\dotnet\sdk\6.0.100-rc.1.21463.6\Current\Microsoft.Common.props (33,3)". This is most likely a build authoring error. This subsequent import will be ignored.
D:\Repos\spv3-loader\src\SPV3.csproj(3,3): warning MSB4011: "D:\Repos\spv3-loader\src\Directory.Build.props" cannot be imported again. It was already imported at "C:\Program Files\dotnet\sdk\6.0.100-rc.1.21463.6\Current\Microsoft.Common.props (33,3)". This is most likely a build authoring error. This subsequent import will be ignored.
  Determining projects to restore...
D:\Repos\spv3-loader\src\SPV3.csproj(3,3): warning MSB4011: "D:\Repos\spv3-loader\src\Directory.Build.props" cannot be imported again. It was already imported at "C:\Program Files\dotnet\sdk\6.0.100-rc.1.21463.6\Current\Microsoft.Common.props (33,3)". This is most likely a build authoring error. This subsequent import will be ignored.
D:\Repos\spv3-loader\src\SPV3.csproj(3,3): warning MSB4011: "D:\Repos\spv3-loader\src\Directory.Build.props" cannot be imported again. It was already imported at "C:\Program Files\dotnet\sdk\6.0.100-rc.1.21463.6\Current\Microsoft.Common.props (33,3)". This is most likely a build authoring error. This subsequent import will be ignored.
  Restored D:\Repos\spv3-loader\ext\hxe\src\HXE.csproj (in 703 ms).
  Restored D:\Repos\spv3-loader\src\SPV3.csproj (in 703 ms).
D:\Repos\spv3-loader\src\SPV3.csproj(3,3): warning MSB4011: "D:\Repos\spv3-loader\src\Directory.Build.props" cannot be imported again. It was already imported at "C:\Program Files\dotnet\sdk\6.0.100-rc.1.21463.6\Current\Microsoft.Common.props (33,3)". This is most likely a build authoring error. This subsequent import will be ignored.
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  0. GitVersion cannot determine the next version in shallow reposistories.
        We will use Git to determine if the current repository needs to be un-shallowed.
   Checking if Git is available...
  1. Git was found.
   It is git version 2.33.1.windows.1 at...
   D:\Apps\Git\cmd\git.exe
  2. Checking if repository is shallow...
  3. Repository is complete. Proceeding to Build...
  0. GitVersion cannot determine the next version in shallow reposistories.
        We will use Git to determine if the current repository needs to be un-shallowed.
   Checking if Git is available...
  1. Git was found.
   It is git version 2.33.1.windows.1 at...
   D:\Apps\Git\cmd\git.exe
  2. Checking if repository is shallow...
  3. Repository is complete. Proceeding to Build...
C:\Users\Noah\.nuget\packages\gitversion.msbuild\5.7.0\tools\GitVersion.MsBuild.targets(134,9): warning : File contains assembly version attributes which conflict with the attributes generated by GitVersion obj\Debug\net5.0-windows\win10-x86\AssemblyInfo.g.cs [D:\Repos\spv3-loader\ext\hxe\src\HXE_5xahz2ov_wpftmp.csproj]
  HXE -> D:\Repos\spv3-loader\ext\hxe\bin\Debug\net5.0-windows\win10-x86\HXE.dll
D:\Repos\spv3-loader\src\SPV3_qpdb5yod_wpftmp.csproj(11,3): warning MSB4011: "D:\Repos\spv3-loader\src\Directory.Build.props" cannot be imported again. It was already imported at "C:\Program Files\dotnet\sdk\6.0.100-rc.1.21463.6\Current\Microsoft.Common.props (33,3)". This is most likely a build authoring error. This subsequent import will be ignored.
  0. GitVersion cannot determine the next version in shallow reposistories.
        We will use Git to determine if the current repository needs to be un-shallowed.
   Checking if Git is available...
  1. Git was found.
   It is git version 2.33.1.windows.1 at...
   D:\Apps\Git\cmd\git.exe
  2. Checking if repository is shallow...
  3. Repository is complete. Proceeding to Build...
  HXE -> D:\Repos\spv3-loader\ext\hxe\bin\Debug\net5.0-windows\win10-x86\HXE.dll
C:\Users\Noah\.nuget\packages\gitversion.msbuild\5.7.0\tools\GitVersion.MsBuild.targets(134,9): warning : File contains assembly version attributes which conflict with the attributes generated by GitVersion obj\Debug\net5.0-windows\win10-x86\AssemblyInfo.g.cs [D:\Repos\spv3-loader\src\SPV3_qpdb5yod_wpftmp.csproj]
  SPV3 -> D:\Repos\spv3-loader\bin\Debug\net5.0-windows\win10-x86\SPV3-Loader.dll
  SPV3 -> D:\Repos\spv3-loader\bin\Debug\net5.0-windows\win10-x86\publish\
@BinToss BinToss self-assigned this Oct 18, 2021
@BinToss BinToss added the bug Something isn't working label Oct 18, 2021
@BinToss
Copy link
Member Author

BinToss commented Oct 18, 2021

Depending on how the builds are timed, the later build could run into a file access error because the earlier build still has the file locked.
In most cases, this is avoided, but it's still possible for builds to fail randomly due to this issue.

@BinToss BinToss changed the title [Bug] ProjectReference 'HXE' is compiled *twice* ProjectReference 'HXE' is compiled *twice* Oct 27, 2021
@BinToss
Copy link
Member Author

BinToss commented Oct 29, 2021

The VSCode extension "aliasadidev.nugetpackagemanagergui" helped me spot the potential cause of this issue.
image

A temporary copy of HXE.csproj is created and later compiled. The filename indicates a relation to WPF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant