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
Warning As Error: Detected package downgrade: Microsoft.NET.StringTools from 18.4.0 to 17.11.48. Reference the package directly from the project to select a different version.
DemoAppHost -> Aspire.Hosting.AppHost 13.6.1 -> StreamJsonRpc 2.25.29 -> Nerdbank.MessagePack 1.2.4 -> Microsoft.NET.StringTools (>= 18.4.0)
DemoAppHost -> Microsoft.NET.StringTools (>= 17.11.48)
@ErikEJ Does this fail on dotnet restore or on dotnet build? I just created a test.csproj with the contents above and did a dotnet restore which works fine?
@ErikEJ Ah, I'm on a Mac so don't have VS handy at the moment. Does just doing a restore work in VS? If that also fails, then the restore graph is somehow different in Visual Studio than it is with the .NET SDK?
@ErikEJ I guess those PackageReferences in the .props file need to be upgraded to match whatever Aspire is using currently (18.4 apparently for Microsoft.NET.StringTools). That will fix it for the time being, but I think we'll need a more robust solution here for the future.
I know there is some work being done around how .NET projects are added to Aspire in the next major version. Haven't looked at it in detail yet, but I believe that should break the dependency on MSBuild so hopefully that will resolve these kinds of issues, but not sure.
@ErikEJ That file was added for a reason in #949 and subsequently updated in #1291, so I'm not sure if just removing it is the right approach? Then again, I don't know the exact reason it was added in the first place.
@ErikEJ I think we'll need to adopt the Dotnet hosting package integration approach here to resolve these kinds of issues. It looks like Aspire is moving away from referencing these projects directly and rather just pointing at their path. That makes sense given the now polyglot nature of Aspire of course, but does mean we'll have to do a lot of things ourselves now (as seen in #2425) that we previously got for free, like building the project, restoring NuGet packages, etc.
@ErikEJ Sure, but I'd still rather not re-invent the wheel. I'm wondering if we could actually build on top of the DotnetProjectResource from the Aspire .NET hosting integration and still get some of this for free
Activity
ErikEJ commentedon Oct 9, 2026
@jmezach FYI
jmezach commentedon Oct 9, 2026
@ErikEJ Does this fail on
dotnet restoreor ondotnet build? I just created atest.csprojwith the contents above and did adotnet restorewhich works fine?ErikEJ commentedon Oct 9, 2026
@jmezach I am building in Visual Studio 2026
jmezach commentedon Oct 9, 2026
@ErikEJ Ah, I'm on a Mac so don't have VS handy at the moment. Does just doing a restore work in VS? If that also fails, then the restore graph is somehow different in Visual Studio than it is with the .NET SDK?
ErikEJ commentedon Oct 9, 2026
@jmezach Looks like restore works, yes. But the SQL Projects does some magic to force the version of the MsBuild libraries.
ErikEJ commentedon Oct 9, 2026
https://github.com/CommunityToolkit/Aspire/tree/main/src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/build
jmezach commentedon Oct 9, 2026
@ErikEJ I guess those
PackageReferencesin the.propsfile need to be upgraded to match whatever Aspire is using currently (18.4 apparently for Microsoft.NET.StringTools). That will fix it for the time being, but I think we'll need a more robust solution here for the future.I know there is some work being done around how .NET projects are added to Aspire in the next major version. Haven't looked at it in detail yet, but I believe that should break the dependency on MSBuild so hopefully that will resolve these kinds of issues, but not sure.
ErikEJ commentedon Oct 9, 2026
@jmezach Removing the .props files fixed thing for me in VS 2026!
ErikEJ commentedon Oct 9, 2026
@aaronpowell @jmezach Happy to create a PR to remove them - thoughts?
jmezach commentedon Oct 9, 2026
@ErikEJ That file was added for a reason in #949 and subsequently updated in #1291, so I'm not sure if just removing it is the right approach? Then again, I don't know the exact reason it was added in the first place.
ErikEJ commentedon Oct 9, 2026
Indeed, neither do I 😄
afscrome commentedon Oct 10, 2026
Yea, the V2 project resources (
AddDotnetProject) only reference the project by path, not as an MSBuild reference, which may solve/avoid these issues.https://aspire.dev/whats-new/aspire-13-6/#-app-model-and-apphost
ErikEJ commentedon Oct 10, 2026
@afscrome ok, so what would a possible solution be?
manuelelucchi commentedon Oct 30, 2026
I'm working on a PR to add support for non PackageReference/ProjectReference and therefore also supporting #1536
ErikEJ commentedon Oct 30, 2026
@manuelelucchi What are you missing? You can also use .dacpac files directly
manuelelucchi commentedon Oct 30, 2026
Yeah but it's not the same as Project/Package support but without needing references (and therefore not being polyglot)
ErikEJ commentedon Nov 18, 2026
@jmezach I managed to get an Aspire 17 AppHost to build in Visual Studio 2026 with the following project file.
Should probably update the docs to call out the new required properties for project references?
Adding
<PackageReference Include="Microsoft.NET.StringTools" Version="18.4.0" />fixes the MsBuild targets workaound warning.Still believe it should be removed tbh.
jmezach commentedon Nov 18, 2026
@ErikEJ I think we'll need to adopt the Dotnet hosting package integration approach here to resolve these kinds of issues. It looks like Aspire is moving away from referencing these projects directly and rather just pointing at their path. That makes sense given the now polyglot nature of Aspire of course, but does mean we'll have to do a lot of things ourselves now (as seen in #2425) that we previously got for free, like building the project, restoring NuGet packages, etc.
ErikEJ commentedon Nov 18, 2026
@jmezach Yeah, too bad. But we now have a pending PR with code to do that 😄
jmezach commentedon Nov 18, 2026
@ErikEJ Sure, but I'd still rather not re-invent the wheel. I'm wondering if we could actually build on top of the DotnetProjectResource from the Aspire .NET hosting integration and still get some of this for free
ErikEJ commentedon Nov 18, 2026
@jmezach Yeah, sounds sensible