6.0.16-rc System.ArgumentException $version$ is not a valid version string

Esben Bach's Avatar

Esben Bach

26 Jun, 2018 07:32 AM

Hi
I have a .net 462 project (using the new project format and package references).
When upgrading from postshar 5.1.3-alpha to 6.0.16-rc i get an exception form post sharp:

warning : The version of PostSharp Tools for Visual Studio (5.0.52.0) is older than the version of the PostSharp NuGet package (6.0.16.0) in this project.
error : error: Unhandled exception (postsharp-x64-srv.exe 6.0.16 release | .NET Framework 4.7.2): '$version$' is not a valid version string.
error : Parameter name: value See below for details.
error : System.ArgumentException: '$version$' is not a valid version string.
error : Parameter name: value
error :    at NuGet.Versioning.NuGetVersion.Parse(String value)
error :    at NuGet.Packaging.Core.NuspecCoreReaderBase.GetIdentity()
error :    at PostSharp.Sdk.CodeModel.Binding.PackageProjectReference.^zfH7YSbV(PlatformInfoFactory _0, String _1, PlatformInfo _2)
error :    at ^rU5MGTYD9kxo.^bhV8(String _0)
error :    at PostSharp.Sdk.Extensibility.Project.^pFnf8wEt(ProjectConfiguration[] _0, ProjectInvocationParameters _1)
error :    at PostSharp.Sdk.Extensibility.Project.^pFnf8wEt(ProjectInvocationParameters _0)
error :    at PostSharp.Sdk.Extensibility.Project.LoadProject(ProjectInvocationParameters projectInvocationParameters, Domain& domain)
error :    at PostSharp.Hosting.PostSharpObject.InvokeProject(ProjectInvocation projectInvocation)
error :    at PostSharp.Hosting.Program.ExecuteImpl()

Not 100% sure, but my bet is that the project that i have postsharp on consumes another project with a .nuspec file (manual) which has a $version$ tag in it.

  1. 1 Posted by Esben Bach on 26 Jun, 2018 07:33 AM

    Esben Bach's Avatar

    And just to clarify - it IS a 462 project, not sure why postsharp insists on mixing in 4.7.2 but thats probably not important.

  2. Support Staff 2 Posted by PostSharp Techn... on 27 Jun, 2018 08:48 PM

    PostSharp Technologies's Avatar

    Hello,

    PostSharp runs on .NET Framework 4.7.2 even when your project targets 4.6.2, this is the information you can see in the error message.

    To diagnose the issue, we would like to ask you for a build log with additional details. Please run the build with the following parameters and send us the new build log:

    • MSBuild log verbosity level set to detailed
    • MSBuild property PostSharpTrace set to AssemblyBinder

    For example on the command line:

    msbuild MySolution1.sln /v:d /p:PostSharpTrace=AssemblyBinder > build.log
    

    Best regards,
    -alex

  3. 3 Posted by Esben Bach on 28 Jun, 2018 06:26 AM

    Esben Bach's Avatar

    Attached build output

  4. Support Staff 4 Posted by PostSharp Techn... on 28 Jun, 2018 05:26 PM

    PostSharp Technologies's Avatar

    Hello,

    Unfortunately we see that InvalidOperationException was thrown while enabling the trace category. That's one more issue we're going to investigate.

    Nevertheless, we have already reproduced the reported build issue and it's filed in our bug tracker (#16236). We will get back to you with information about the progress.

    -alex

  5. Support Staff 5 Posted by PostSharp Techn... on 03 Jul, 2018 11:31 AM

    PostSharp Technologies's Avatar

    Hello,

    we have fixed #16236 and #16235 (trace bug) in PostSharp 6.0.17-rc.

    Best regards,
    Daniel

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac