TAGC / dotnet-setversion

.NET Core CLI tool to update the version information in .NET Core *.csproj files
MIT License
75 stars 16 forks source link

Error when running #25

Closed melsawy93 closed 1 year ago

melsawy93 commented 1 year ago

Hi, I just discovered this, is this still working? I am trying to run this and getting this:

C:\Users\moustafa.el-sawy\OneDrive\Plugins\Combinito\Combinito>setversion 1.1.1 Combinito.csproj Unhandled exception. System.InvalidOperationException: This operation would create an incorrectly structured document. at System.Xml.Linq.XDocument.ValidateDocument(XNode previous, XmlNodeType allowBefore, XmlNodeType allowAfter) at System.Xml.Linq.XDocument.ValidateNode(XNode node, XNode previous) at System.Xml.Linq.XContainer.AddNodeSkipNotify(XNode n) at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content) at System.Xml.Linq.XContainer.Add(Object content) at dotnet_setversion.Extensions.GetOrCreateElement(XContainer container, String name) in C:\projects\dotnet-setversion\src\dotnet-setversion\Program.cs:line 187 at dotnet_setversion.Program.SetVersion(String version, String csprojFile) in C:\projects\dotnet-setversion\src\dotnet-setversion\Program.cs:line 150 at dotnet_setversion.Program.Run(String version, String csprojFile) in C:\projects\dotnet-setversion\src\dotnet-setversion\Program.cs:line 58 at dotnet_setversion.Program.Run(Options options) in C:\projects\dotnet-setversion\src\dotnet-setversion\Program.cs:line 32 at CommandLine.ParserResultExtensions.MapResult[TSource,TResult](ParserResult1 result, Func2 parsedFunc, Func`2 notParsedFunc) at dotnet_setversion.Program.Main(String[] args) in C:\projects\dotnet-setversion\src\dotnet-setversion\Program.cs:line 18

TAGC commented 1 year ago

Hey, is it okay to post the contents of your csproj file?

melsawy93 commented 1 year ago

Yes sure.

`<?xml version="1.0" encoding="utf-8"?>

Debug AnyCPU {4F6D9F29-E2B9-4299-9F90-2C930FDBA2A3} Library Properties Combinito Combinito v4.7.2 512 true true full false bin\Debug\ DEBUG;TRACE prompt 4 pdbonly true bin\Release\ TRACE prompt 4 true bin\x64\Debug\ DEBUG;TRACE full x64 7.3 prompt bin\x64\Release\ TRACE true pdbonly x64 7.3 prompt packages\CSIAPIv1-All.1.25.0\lib\net\CSiAPIv1.dll packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll packages\Prism.Core.8.1.97\lib\net47\Prism.dll packages\Prism.Unity.8.1.97\lib\net47\Prism.Unity.Wpf.dll packages\Prism.Wpf.8.1.97\lib\net47\Prism.Wpf.dll packages\Syncfusion.Data.WPF.20.1.0.59\lib\net46\Syncfusion.Data.WPF.dll packages\Syncfusion.Licensing.20.1.0.59\lib\net46\Syncfusion.Licensing.dll packages\Syncfusion.SfGrid.WPF.20.1.0.59\lib\net46\Syncfusion.SfGrid.WPF.dll packages\Syncfusion.Shared.WPF.20.1.0.59\lib\net46\Syncfusion.Shared.WPF.dll packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll packages\Unity.Abstractions.5.11.7\lib\net47\Unity.Abstractions.dll packages\Unity.Container.5.11.11\lib\net47\Unity.Container.dll EndSummary.xaml MainWindow.xaml SettingsWindow.xaml {F4D59EF1-2724-48D6-B076-04D8B9A5C01B} Combinito.Business {28902f05-e1c0-4ef1-8d4a-80b9db70e141} Combinito.Core {E60F69D6-D12E-48F7-A481-675AFEFBA179} Combinito.Services.Interfaces {cf0f5d5d-a95a-4d60-aa3c-16ccf599553d} Combinito.Services {B96561CB-2BFF-4DDB-A3AF-335FB9112F5D} Combinito.Modules.LCombGenerator {4D838356-5AB5-4748-B267-F062CBA3F8D6} Combinito.Modules.LCombImporter {CA7B02AC-E590-4C66-A81F-6BCDF6E64B6E} Combinito.Modules.LCombModifier Designer MSBuild:Compile Designer MSBuild:Compile Designer MSBuild:Compile `
melsawy93 commented 1 year ago

Can it be due to my project being a .NET Framework not a .NET Core project?

TAGC commented 1 year ago

Can it be due to my project being a .NET Framework not a .NET Core project?

I'm afraid so yeah, this tool is meant for .NET Core/.NET 5+, it doesn't support .NET Framework.