Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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

Posted

I updated NuGet and still get the build errors.

I'm a mainframe programmer by trade, so don't assume anything.  😄

1649562339_NuGet2.png.71b3a980cbadd2b8046a74e657d228f1.png

 

I checked X64 on the project properties, still got those errors.

259332915_NuGet3.thumb.png.36fd66dcfb649539814d7159c525f04b.png

Posted

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
Posted

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.)

 

Posted
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.  🙂

Posted

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
Posted

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
 

Posted
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
Posted

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
Posted
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

Posted
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.

Posted

That worked, had the choice of NET 6 and 7.
 

Public Class Form1

End Class



EDIT: I compiled the FSUIPC Example Code VB package, and the form opened properly.

Posted
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.

Posted

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
Posted

Can you name it KK2023_FSUIPCforNET?

I've seen instances of complications trying to rename projects in VS.

EDIT: Added underscore.

Posted

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

 

Posted

Strange. Seems like something very wrong with your .NET/Visual Studio installation.

What does your dotnet --info say now?

What version of Windows are you using?

Paul

Posted

edit: pic HAS WRONG PACKAGE CIRCLED.

I just noticed I was missing UNIVERSAL WINDOWS PLATFORM DEV, installing now.
817247861_NETdesktop.png.a97effc723ce7d9c74ca7e62297d2ec6.png

Dotnet:
Dotnet.png.6741fc150b9f166b4e38eebdb14a12af.png

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.