Jump to content
The simFlight Network Forums

NuGet is not automatically downloading DLL?


Demon

Recommended Posts

Hi,

I've downloaded the templates and copied them into the VB folder, created a new project using WinForm VB Manual and keep getting build errors.

Error	CS0246	The type or namespace name 'FSUIPC' could not be found
Error	CS0103	The name 'FSUIPCConnection' does not exist in the current context
Warning			The referenced component 'FSUIPCClient' could not be found.

...plus a few others, but they all seem to refer to this...

NuGet never seems to take over and download the missing DLL automatically. 

From the instructions on the website:

Quote

Visual Studio will locate the latest version of the DLL via NuGet, download it and install it for you.

VS Tools / Options / NuGet Package Manager:

  • CHECKED Allow Nuget to download missing packages
  • CHECKED Automatically check for missing packages during build

Using:

  • Visual Studio 2022
  • Net framework 4.8.04084
  • NuGet 6.5.0
  • VB tools 4.5.2

Any idea what I'm missing in my VS configuration?

EDIT: Added NuGet package sources image.
NuGet.png.9239766d4cab0a6f48f87737b0535748.png

Link to comment
Share on other sites

Hi Demon,

I've just checked the templates. They were written 5 years ago so they're a bit out-of-date now. The main problem is that the templates target the .NET 4.0 framework, but the DLL stopped supporting that earlier this year. That's probably why NuGet isn't downloading it.

I'll update them sometime this weekend to Visual Studio 2022, targeting .NET 6.

I'll post back here when the new ones are on the website.

Apologies for the issues. I forgot they'd still be on .NET 4.

Paul

  • Thanks 1
Link to comment
Share on other sites

I have Framework 4.6.2, 5, 6 and 7 folders in my project.

But my target framework in my project is 4.8.

Framework.png.13616b1b1c8e5ee4e55a2083dbaea89e.png

And this is the framework tools I've accumulated in VS over the last month or so.
155360455_VStools.png.b720190e642a211e325087ca01f8aeb8.png

This project is my sole priority for this MSFS project.  Any unnecessary tools can be removed.  I just don't know what I need for FSUIPCforNET.

(I need to be able to use USB and GUIs, that's it.)

 

Link to comment
Share on other sites

3 minutes ago, Paul Henty said:

Hi Demon,

I've just checked the templates. They were written 5 years ago so they're a bit out-of-date now. The main problem is that the templates target the .NET 4.0 framework, but the DLL stopped supporting that earlier this year. That's probably why NuGet isn't downloading it.

I'll update them sometime this weekend to Visual Studio 2022, targeting .NET 6.

I'll post back here when the new ones are on the website.

Apologies for the issues. I forgot they'd still be on .NET 4.

Paul

Dude, no apologies required at this end.

You're making all our lives so much easier with this interface.  🙂

Link to comment
Share on other sites

The new templates are now on the website:

http://fsuipc.paulhenty.com/#downloads

They are for Visual Studio 2022 and target NET6 as that's the current version on Long Term Support.

There's now an extra installation step: after you copy the files from the zip you need to run:

devenv /updateconfiguration

from the developer command prompt (as administrator). This will update the templates cache.

Full instructions are on the download page.

If you have Visual Studio 2022 installed you will also have the required NET6 development environment. That's all you need.

Make a new project from the new templates and everything should work properly.

Paul

  • Like 1
Link to comment
Share on other sites

Thanks for the quick turn-around Paul but I keep getting SYSTEM EXCEPTION.

What I've done:


1. The new templates are in the VS document folder, and they show up when I search for FSUIPC from within VS (I checked the dates).

2. I ran "devenv /updateconfiguration", it took a few seconds to process.
UpdateConfiguration.png.6746ee1024e087377cf91aa90b5a1277.png

 

3. I start VS as admin, create a new project without code, search FSUIPC and select WINFORM MANUAL VB, but I keep getting System Exception.

1338383491_VSsystemexception.png.e5cd971744e3f10119f6caea1b137365.png

The only step I missed is the "set language to VB" part.  I don't know how to do that, no clue if that has any bearing on this error.

This is my current VS configuration (I removed other stuff that I had accumulated and added USB CONNECTIVITY).
999214305_VStools.thumb.png.fd350cda1637312aca674f3899ec623c.png

Robert
 

Link to comment
Share on other sites

Quote

The only step I missed is the "set language to VB" part.

That's okay - it just filters the list of templates to VB only.

Please can you try creating a project using the built-in template called "Windows Forms App" (Not the one with '.NET Framework' at the end).

When it asks for the .NET version select NET 6.0.

Make sure you can run it and get the blank form up.

Let me know if that's okay.

Paul

  • Like 1
Link to comment
Share on other sites

It doesn't look like you've got the Visual Basic language installed.

Run the Visual Studio installer and press the modify button.

Make sure you've go Windows Desktop Development ticked and then press Modify to install it.

If it's already ticked you might have to go back and run a repair.

image.thumb.png.3887a9ce37ce467f79308a4542cde98f.png

Paul

  • Like 1
Link to comment
Share on other sites

4 minutes ago, Paul Henty said:

It doesn't look like you've got the Visual Basic language installed.

Run the Visual Studio installer and press the modify button.

Make sure you've go Windows Desktop Development ticked and then press Modify to install it.

If it's already ticked you might have to go back and run a repair.

Paul


Yup, installing it now.


In the meantime, does this look correct?

Dotnet.png.b20244e957ed2f9662d1bfcc8dace931.png

Link to comment
Share on other sites

12 minutes ago, Paul Henty said:

It doesn't look like you've got the Visual Basic language installed.

Run the Visual Studio installer and press the modify button.

Make sure you've go Windows Desktop Development ticked and then press Modify to install it.

If it's already ticked you might have to go back and run a repair.

Paul


Nope, same error.

I'm rebooting.

EDIT: I get that error for all 4 templates, winform and wpf.

Link to comment
Share on other sites

2 minutes ago, Paul Henty said:

Okay - that's some progress.

Are my templates still giving the same error?

Paul

Yup, just checked.

EDIT: I bet 2 cookies that my VS config is too "defaultish", yours probably has something I'm missing.

Link to comment
Share on other sites

One last suggestion I have is to go back to the developer command prompt (as admin) and run this:

devenv /InstallVSTemplates

Then open Visual Studio and try again.

If that doesn't work I'll just create a new project from that template here and sent it to you. That's probably the simplest thing. 

Paul

  • Like 1
Link to comment
Share on other sites

I get this on open:
 

K:\Project_v2\VBnet\KK2023_FSUIPCforNET\KK2023_FSUIPCforNET\KK2023_FSUIPCforNET.vbproj : error  : The SDK 'Microsoft.NET.Sdk' specified could not be found.  K:\Project_v2\VBnet\KK2023_FSUIPCforNET\KK2023_FSUIPCforNET\KK2023_FSUIPCforNET.vbproj

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.