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
Describe the bug
When you have a project specifiying multiple target frameworks, the parallel build using dotnet build seems to crash the generation of the gitversion.json file.
Expected Behavior
It should just build all target frameworks. My assumption is that this only occurs when you specify more than 1 target framework as I have other projects just targeting net5.0 without any problems.
Actual Behavior
When you build, the gitversion.json locked exception occurs in the command line:
Serilog.Sinks.Telegram -> C:\Users\Nutzer\Documents\Temp\Github\CSharpUndVB\Serilog.Sinks.Telegram\src\Serilog.Sinks.Telegram\bin\Debug\net462\Serilog.Sinks.Telegram.dll
ERROR [02/02/21 9:12:20:47] An unexpected error occurred:
System.IO.IOException: The process cannot access the file 'C:\Users\Nutzer\Documents\Temp\Github\CSharpUndVB\Serilog.Sinks.Telegram\src\Serilog.Sinks.Telegram\obj\gitversion.json' because it is being used by another process.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
at GitVersion.FileSystem.WriteAllText(String file, String fileContents, Encoding encoding) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\FileSystem.cs:line 47
at GitVersion.FileSystem.WriteAllText(String file, String fileContents) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\FileSystem.cs:line 42
at GitVersion.VersionConverters.OutputGenerator.OutputGenerator.Execute(VersionVariables variables, OutputContext context) in D:\a\GitVersion\GitVersion\src\GitVersionCore\VersionConverters\OutputGenerator\OutputGenerator.cs:line 39
at GitVersion.GitVersionOutputTool.OutputVariables(VersionVariables variables, Boolean updateBuildNumber) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\GitVersionOutputTool.cs:line 42
at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersionExe\GitVersionExecutor.cs:line 66
INFO [02/02/21 9:12:20:47] Attempting to show the current git graph (please include in issue):
INFO [02/02/21 9:12:20:47] Showing max of 100 commits
INFO [02/02/21 9:12:20:52] * 39b6b89 3 days ago (HEAD -> master, origin/master, origin/HEAD)
* f81b88f 5 days ago (tag: 1.0.8)
* 5fc8ab7 5 days ago
|\
| * 877c361 7 days ago
| * e4e1ae1 8 days ago
|/
* dd27c4a 3 weeks ago
* 124f098 4 weeks ago
* 7d2aea9 4 weeks ago (tag: 1.0.7)
* 5ab0027 4 weeks ago (tag: 1.0.6)
* ff56bb9 4 weeks ago
* b744730 4 weeks ago (tag: 1.0.5)
* 8e646a3 4 weeks ago
* 3349b06 4 weeks ago
|\
| * cfa9759 9 months ago (jessicah-origin/master)
* | 60c4560 4 weeks ago
* | 9bf0d87 4 weeks ago
* | 6e9ddb1 4 weeks ago
* | 2653445 4 weeks ago
* | 62d183f 4 weeks ago
* | 22d5d61 4 weeks ago
* | 0c14d3e 4 months ago (tag: 1.0.4)
* | 9572efc 4 months ago
* | c8f57e3 4 months ago
* | 585f8e6 4 months ago
* | 30db99e 8 months ago (tag: 1.0.3)
* | f58a4d9 9 months ago
* | 718aa3d 9 months ago
|/
* 5ff558d 9 months ago
* 3eb7b99 9 months ago
* c2c819c 9 months ago (tag: 1.0.2)
* c29320e 1 year, 3 months ago
* f11ed6f 1 year, 3 months ago
* 16b6cf3 1 year, 3 months ago (tag: 1.0.1)
* 28deab3 1 year, 3 months ago
* b6b710c 1 year, 3 months ago
* a0a042f 1 year, 7 months ago
* e80f820 1 year, 7 months ago
* b3a4ea5 1 year, 7 months ago
Describe the bug
When you have a project specifiying multiple target frameworks, the parallel build using
dotnet build
seems to crash the generation of thegitversion.json
file.Expected Behavior
It should just build all target frameworks. My assumption is that this only occurs when you specify more than 1 target framework as I have other projects just targeting
net5.0
without any problems.Actual Behavior
When you build, the
gitversion.json
locked exception occurs in the command line:Possible Fix
No idea.
Steps to Reproduce
<TargetFrameworks>net46;net462;net47;net472;net48;netstandard2.0;netstandard2.1;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
dotnet build
from the command line in theSerilog.Sinks.Telegram
folder on project level.Context
Daily work, updating my nuget packages.
Your Environment
dotnet --info
:The text was updated successfully, but these errors were encountered: