-
Notifications
You must be signed in to change notification settings - Fork 651
MSBUILD : Task factory warning NMSBT010: There is a mismatch between SDK NuGet version (4.9.2) and the NuGet version the task factory was compiled against (4.8.0). There might occur some exotic errors. #1554
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
Comments
Furthermore, I've tried the latest beta version (4.0.1-beta1-53), which targets Utilpack 2.9.1:
My Project targets net462 due to some libraries that we're required to use, but we use aspnetcore (wanted to upgrade to 2.2 when faced the issue). I'd appreciate any suggestions how to fix the issue. |
Hi @czeslav87 , can you submit a minimal repro and/or a log with /verbosity set to detailed if not even diagnostic? Edit: Either here or make an issue on https://github.com/stazz/UtilPack :) |
Will do my best to provide repro asap. |
GitVersionBugRepro.zip Best regards. |
Ah yes, the
Version I tried updating to GitVersionTask
So it successfully used NuGet API to restore the package, and started running it. It failed to load the managed assembly, but that is due the fact that it was not really part of any NuGet package, as I manually copied it. But I think this is one thing that definetly will need some improving - smarter native package dependency resolution. In any case, this seems to be more about version Can you confirm you get as far as this with P.S. The |
@stazz yes, I'm having the same results with 4.0.1-beta1-53. LibGit2Sharp Is missing
|
Fun thing is, if you manually add dependency to the <dependencies>
<group>
<dependency id="UtilPack.NuGet.MSBuild" version="2.9.1" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.0">
<dependency id="UtilPack.NuGet.MSBuild" version="2.9.1" exclude="Build,Analyzers" />
<dependency id="YamlDotNet" version="5.2.1" exclude="Build,Analyzers" />
<dependency id="LibGit2Sharp" version="0.26.0-preview-0070" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETFramework4.6.1">
<dependency id="UtilPack.NuGet.MSBuild" version="2.9.1" exclude="Build,Analyzers" />
</group>
</dependencies> There will be no errors. :) |
same issue here. any fixes? |
The GitVersionTask version |
tried that but getting
|
4.0.1-beta1-58 on minimal repro:
|
@bonesoul Have you tried settings @czeslav87 It looks like the UtilPack is loading assemblies OK, but first there is a warning about Edit: I'll try to get work started related to #1537 this weekend. Hopefully soon it will be possible to lock down NuGet version in .NET Core, thus avoiding quite a lot of confusion as .NET Core versions keep changing. |
I've just looked up |
@stazz no luck today. Same errors. I'm attaching detailed log |
I took a look in the output logs. Where it says <PropertyGroup Condition=" '$(UpdateVersionProperties)' == 'true' ">
<Version>$(GitVersion_FullSemVer)</Version>
[ and so on ... ]
</PropertyGroup> Since the target failed previously (as a warning about One way to remedy this is to add a guard to the property assigned, like this: So the right way to fix this is to make the warning into error. However, I don't know what's going on with |
Similar error here on Getting
|
Also encountering the same issue with beta1-58. I'm trying to run |
beta1-51 works for me currently, but not later or earlier versions
…On Fri, Jan 11, 2019, 7:53 AM Vasili Puchko ***@***.***> wrote:
Also encountering the same issue with beta1-58. I'm trying to run dotnet
pack for libraries targeting .Net Core 2.1. Any workarounds or ideas how
that can be fixed?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1554 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD0bThM6_BUpyy3l0yGMGJ_y_1iEjzWks5vCIlKgaJpZM4ZWCsM>
.
|
I am just curious to know if there has been any work done on this as the warning about |
I'm also curious what the status of this is. Unlike @wjrogers,
Perhaps naively (?) I would assume this has something to do with the
…since that's presumably what's resulting in the |
@JeremyCaney Since my earlier comment, I found that no version works with |
I'm hitting this issue as well targeting |
Hi @adstep and others, I've been working on this issue for a bit now. The work is going on in https://github.com/stazz/NuGetUtils repository, and after that, some work needs to be done for GitVersion task to be compatible with the changes. Once that is done, the whole reason for this issue will disappear. It's hard to give any estimates, but major part of the work in NuGetUtils repository is already done, and I don't foresee any big design- or implementation-level troubles ahead of me. |
@stazz do you think you could make those changes for GitVersion as a PR? |
@arturcic I can try at least. I'll do the forking and working on it once all my tests work fine in NuGetUtils repo. :) I'll write here if I bump into something that I can't solve by myself. |
@stazz Do you already have some status update for us? 👍 |
Hi! The status currently is that I just yesterday got the NuGetUtils.MSBuild.Exec package in such state that it actually builds completely in CI. I forked this repo and made some preliminary checks to it. At first glance I don't expect very big changes, but of course, you never know until you've done it. :) I do have one question tho: While I dev my fork, what is the suggested approach to test that everything still works? I see there are |
Hey @stazz, currently we use appveyor and azure pipelines for building/ validating the PRs and commits. The actual build/ test process is done using cake-build and CI is just triggering cake to build the code/ run tests and publish new artifacts. You can also run the same cake build locally and do the tests locally. In order to do that you can run ./build.ps1 -script build.cake -target Test, or ./build.ps1 -script build.cake -target Build (on windows or linux using powershell core or windows powershell). If you need any other help related to building ping me on gitter. |
You can also create a PR and continue pushing commits to the branch you're working on and the CI configured for our repo will build/ validate the code from PR branch |
Thank you @arturcic for the answers! Regarding creation of PR and branching: what is the branching model and policies for this repository? Should I just do all the development directly to P.S. I probably won't be able to work very much on this until sunday due to my schedules. |
Well usually it's easier to create a feature branch for the PR, and that's the recommended approach. There are some checks in the build script if it's the main branch or not, and depending on that we build in a way or another, so I suggest just create a feature branch |
I am also running into this issue and I'm desperately trying to understand how to resolve this. I've seen in other issues that have been opened about this to use a UTILPACK_NUGET_VERSION environment variable, however I can't seem to find any documentation on how this is used or even configured properly. Any help on this would be awesome. |
The problem was deep in the design of UtilPack task factory which GitVersionTask uses to load itself. The UtilPack task factory is now NuGetUtils task factory, with design which avoids this problem altogether. There is an ongoing effort to incorporate NuGetUtils task factory in #1634 and #1645 , the latter is probably latest. |
Resolved by #1677. |
Hello,
Issue strikes back with new dotnet core sdk (i'm using 2.2.101). Warning is followed by an error:
Best regards,
Maciej
The text was updated successfully, but these errors were encountered: