Demon Posted April 14, 2023 Report Posted April 14, 2023 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.
Demon Posted April 14, 2023 Author Report Posted April 14, 2023 I updated NuGet and still get the build errors. I'm a mainframe programmer by trade, so don't assume anything. 😄 I checked X64 on the project properties, still got those errors.
Paul Henty Posted April 14, 2023 Report Posted April 14, 2023 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 1
Demon Posted April 14, 2023 Author Report Posted April 14, 2023 I have Framework 4.6.2, 5, 6 and 7 folders in my project. But my target framework in my project is 4.8. And this is the framework tools I've accumulated in VS over the last month or so. 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.)
Demon Posted April 14, 2023 Author Report Posted April 14, 2023 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. 🙂
Paul Henty Posted April 15, 2023 Report Posted April 15, 2023 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 1
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 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. 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. 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). Robert
Paul Henty Posted April 15, 2023 Report Posted April 15, 2023 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 1
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 These two get errors. But it works if I create a C++ project. EDIT: CLR.NET project works too.
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 I can create this but it doesn't give me NET6 as an option, even though I have it installed in my VS settings.
Paul Henty Posted April 15, 2023 Report Posted April 15, 2023 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 1
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 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?
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 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.
Paul Henty Posted April 15, 2023 Report Posted April 15, 2023 Check you now have this template and can successfully create a new project from it and run it. 1
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 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.
Paul Henty Posted April 15, 2023 Report Posted April 15, 2023 Okay - that's some progress. Are my templates still giving the same error? Paul 1
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 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.
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 I tried this C++ MSFS WASM template from a while back and it worked.
Paul Henty Posted April 15, 2023 Report Posted April 15, 2023 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 1
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 Can you name it KK2023_FSUIPCforNET? I've seen instances of complications trying to rename projects in VS. EDIT: Added underscore.
Paul Henty Posted April 15, 2023 Report Posted April 15, 2023 Try this: Just unzip it and open the .sln. KK2023_FSUIPCforNET.zip Paul 1
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 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
Paul Henty Posted April 15, 2023 Report Posted April 15, 2023 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
Demon Posted April 15, 2023 Author Report Posted April 15, 2023 edit: pic HAS WRONG PACKAGE CIRCLED. I just noticed I was missing UNIVERSAL WINDOWS PLATFORM DEV, installing now. Dotnet:
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now