Teamcity nugets with .net 5.0 not showing up in Visual Studio - c#

I am building an assembly based on .NET 5.0, and I am publishing it as a nuget package, to be used in other projects.
It is built with Teamcity on premises, and published here, too:
When I try to use it in another solution in Visual Studio, it doesn't show up in the list of nuget packagess. Yes, the assembly/nuget is there, but not in the correct version:
I just upgraded the target framework in the devexpress build jobs to be net5.0windows7.0
I am wondering if that has caused my trouble or it may basically be that .net5.0 is no longer supported...
(I intended to do that upgrade as next step, but I don't want to leaves something broken).
Has anyone had the same experience of nuget packages not being shown?

Ahh, found it ;-)
just had to look in the right place...
It is simply the sort order, and the change from 2 digits to 3 that fooled me.
Everything works nicely ;-)
i.e. 95 was the old no. 104 was the new..(and yes I had deleted the builds in between)

Related

VS2010 C# not including correct .net framework version in target

I am doing maintenance work on a VS2010 C# project built against .net v3.5.
I recently changed the project Target Framework properties to the latest version listed (v4) - due to an expectation of using a version of .net that is actually included in Win10 by default - and rebuilt without any apparent issues.
Unfortunately the embedded dependency in the generated .exe is still for .net v2.0.50727 (which is what is reported for v3.5 AFAIK) and the target machine (a clean install of Win10) is asking to install .net 3.5.
Using MS VS2010 v10.0.40219.1 SP1Rel.
Unfortunately upgrading the build tools isn't an option (building the program with VS2015 works just fine).
I have gone googling but don't seem to have found any similar reports.
Based on some of the comments already posted, I seem to have not made myself entirely clear - hopefully the following will help.
1) the intention/requirement is to be able to install this app on a clean install of Win10 without needing any further downloads. (installing .net 3.5 is easy to do, just not what is wanted)
2) the ultimate build environment for this is automated, visualized and not in my control and therefore upgrading the tool chain is a major pain that I'd like to avoid if possible.
3) AFAIK there are no third party libraries involved. All of the listed references (dll's) are v4.0.30319.
4) this is a XAML-based development, one part of three projects in the solution - the other entries are the installer and a C# custom installation library. As far as I can tell everything is set for .net v4.
Unfortunately the embedded dependency in the generated .exe is still for .net v2.0.50727 (which is what is reported for v3.5 AFAIK) and the target machine (a clean install of Win10) is asking to install .net 3.5
So there is some dependency in your project that targets that version of .NET. It could just be that you need to Build > Clean Solution and with a Build > Rebuild Solution the problem is solved.
Otherwise, assuming some library does require some .NET 3.x library, the installation request is entirely correct. Windows 10 does not have an option for installing .NET 2.0 and another for installing .NET 3.5. If you search for Turn Windows features on or off you will see this:
Any dependency on a .NET 2.x-3.x library will trigger the activation/installation of the first feature in the dialog.
As far as I can see, you have 2 options:
Move everything to a framework supported by Microsoft, most preferably .NET 4.7.2 given support and security.
Deal with the installation process and understand that Microsoft does not install these versions of .NET in purpose. You can, however, add these installers as a prerequisite and even bundle them with your installation, but that won't help much.
Thanks to all who have tried to help me!
The issue has been resolved.
There appear to have been two causes for this issue and my confusion:
it turns out that the blank install of Win10 that the testing was being performed on was not entirely clean - the pre-installed network drivers/utilities from intel also had a .Net v3.5 dependency...
one of the embedded resources in the project was effectively a uncompressed tar-ball containing a number of files; including an executable that had the dependency on .net v3.5 - this was a binary blob stored in svn so the content was had not been updated for several years (ie well before my involvement) ...
With both of these issues addressed it would appear that my problem is solved, so once again thank you for your feedback, suggestions and patience,
PeterT :->

Microsoft.Toolkit.Uwp.UI.Controls giving warnings when updated project to Fall Creators Update - Visual Studio UWP

I needed to change the min version as I must implement SQL framework.
Unfortunately, after changing min version to Fall Creators Update I get multiple reference errors, all talking about dll's missing like this:
The referenced component '(...)Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\netstandard.library\2.0.2\build\netstandard2.0\ref\System.Drawing.dll' could not be found
I get 116 warnings in total. I can still build and launch app, however it makes me wonder whats wrong.
I am pretty much sure whats giving these warnings.
I recreated the app by creating new solution and project and moving all code from the previous version.
Everything went smooth until I installed this:
Microsoft.Toolkit.Uwp.UI.Controls
And the warnings appeared again.
The app works anyway, and the controls from the package I use work well too.
But whats wrong with the package? Is it not compatible with fall creators update?
Is there a mode to fix it? Or can I ignore it?
Microsoft.Toolkit.Uwp.UI.Controls giving warnings when updated project to Fall Creators Update - Visual Studio UWP
This issue should be an issue about the package Microsoft.Toolkit.Uwp.UI.Controls.
According to the error message:
The referenced component '(...)Program Files (x86)\Microsoft
SDKs\UWPNuGetPackages\netstandard.library\2.0.2\build\netstandard2.0\ref\System.Drawing.dll'
could not be found
It seems the UWP project missing the .net standard 2.0 references after installing the package Microsoft.Toolkit.Uwp.UI.Controls. So, to resolve this issue, we could add the .net standard library 2.0 package to the UWP project.
Besides, when I wanted to report this issue to the author of the package, I discovered that you have already done that. This is great. And I have found devsko provided the workaround, I post it here, so this can be beneficial to other community members reading this thread:
I just added Netstandard.Library package with NuGet Package Manager to my UWP library. That solved my problem
Certified: The referenced component could not be found - warnings in Fall Creators Update Min Target.

Missing ASP.NET Core templates in VS Enterprise 15 Preview 5

I just installed Preview 5. I've mainly been doing front-end work for the past year, but I figured I'd start checking out .NET core finally, now that it seems more stable.
I've got an MSDN subscription, so I grabbed the Enterprise Preview 5 download and installed it.
Here are my options for framework version when I go to start a new project.
Here are my options for new web project. If I reopen the installer to Manage my installation,
here are the .NET components I have installed.
Here are my compilers and build activities. As far as I can tell, I've got everything I need to have installed in order to use DNC, but it's just not showing up.
Any ideas?
I've got a .NET Core tab under Visual C# after I've followed the instructions here although I'm not sure if it's the same for VS 15, I've been using VS 2015 with Update 3.
However it appears that some templates have been published here and maybe this is what you're looking for.
I'm not sure about "it seems more stable" especially that they still didn't move from project.json to .csproj (scheduled for the end of the year) but good luck and have fun. Be patient, it will get there :).

Missing namespaces when downgrading to asp.net 4.0

I just had to downgrade my ASP.Net 4.5 application to an ASP.Net 4.0 application, because our servers don't support 4.5. The way I downgraded it was pretty simple:
Project -> Properties -> Application -> Target Framework
When it finished doing stuff, I restarted the solution, tried to start debugging, but it stopped right after I started debugging, giving me first some errors (which say they can't find some namespaces) for a fraction of a second and after the errors disappeared it gives me 127 warnings that all look like this:
Now I know what the problem is here, but I don't know how to solve this issue.. Does anyone know how to fix these warnings?
Thanks in advance
INFO
I'm using Visual Studio 2015 Community
Remove your current references to the Dlls in question and them add them again, it should load the correct versions of the Dlls. Because you had references to the 4.5 versions and then changed the project target the references are invalid now because they are build against a higher version framework. Changing the projects framework version target does NOT update the references in most cases
It is actually not that easy when it comes with ASP.NET. You have to go through all web.config(s) and downgrade referenced libraries. If its new project, just create new ASP.NET on .NET 4 and compare its web.config(s) with yours.

How to upgrade Ajax Control Toolkit to the latest version only to a particular solution

I am planning to upgrade Ajax Control Toolkit (ACT) from version 4.x to the latest 15.x. I have several Visual Studio solutions running on the same computer, and I want to upgrade only for some solutions and keep the others running the existing older versions. Initially I thought of using the DevExpress's installer for the latest ACT at https://ajaxcontroltoolkit.codeplex.com/releases/view/618129 . But the problem is that it is an .exe installer and per the documentation it will install on all the Visual Studio solutions/projects. I saw another option of using nuget's package manager at https://www.nuget.org/packages/AjaxControlToolkit/ using the command PM> install-package AjaxControlToolKit. I am not sure whether this will also install on all projects or only the project opened on which I ran the command. If there is a better safe way of upgrading the ACT, I would like to know also, such as copy/paste/replace the older dll with newer one.
Thanks
I used the nuget's method given in the second link mentioned above. It specifically adds new dll to the selected solution/project only.
In the past years the AjaxControlToolkit has been adopted by DevExpress, by the grace of Microsoft itself. On the now official GitHub repo for the AjaxControlToolkit there is a handy guide in their documentation that walks you through upgrading from 7.x or lower to v18+.
In a nutshell it covers the following main changes:
Installing the latest version (tip: use NuGet for only a particular solution)
Replace ToolkitScriptManager with ScriptManager
Clean up Web.config
Use Microsoft.Web.Optimization for bundling and minification
Html Editor (namespace changes)
Its basically a one pager and it dit help me in covering the main pain points of upgrading such a major change.
Please note that in terms of versioning, there aren't that many major bumps: from v8 it bumps directly to v15 and up to v19 as of 2019. Every major version since 2015 is prefixed with the year or release as major version. And it stopped in 2020 with v20.1.0. See the version history at NuGet.

Categories