After suffering with publishing my working Wisej/Visual Studio 2022 application, I have created a WiseJHellowWorld application that does absolutely nothing but load the default created window1.
I created this app by opening VS 2022, selecting VB, Windows, Wise4.
Then created a Wisej.NET 4 Web Application (VB)…clicked CREATE
It suggested .NET framework 4.8.1 and .NET Core .NET 8. (I’ve tried both 8 and 9)
The project is created and a default Window1.vb exists.
I build the solution without adding or changing anything at all.
I run it locally and it works fine.
When I try to publish this I get: The ‘Publish’ target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify one of the following frameworks in order to publish: net481, net9.0-windows, net9.0
I edit properties for my project and find net481;net9.0-windows;net9.0 is specified.
I change this to net481, clean and rebuild the app and when I try to publish, I get the same error except there is only one target: The ‘Publish’ target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify one of the following frameworks in order to publish: net481
This occurs when I publish to anywhere, the web, a file, etc…
Please advise.
Hi Rusty,
You would need to do the following if you’re aiming to publish using the publishing tools:
Replace <TargetFrameworks> with <TargetFramework> in your csproj file
When the publishing has succeeded, go to your web.config file and make sure that the AspNetCore is the first handler that appears before Wisej’s (it’s easily identifiable by the .wx extension)
And you should be good to go!
Please note that the publishing tool only works with .NET CORE targets (i.e .NET 8.0 and up)
If you want to target .NET Framework 4.8, then please follow the guide here: https://docs.wisej.com/deployment/targets/iis#net-framework
HTH,
Alaa
Thanks again:)
Visual Studio Publishing does not work with SDK-Style projects targeting .NET Framework
How does one publish to a web host?
Thanks!
I don’t have that installed.
I have the below image installed… How far back do I need to go?
Hello,
This is due to the Windows update KB5066835. It broke IIS services. You need to uninstall the update.
See also this forum issue: https://wisej.com/support/question/cannot-add-items-to-designer-or-preview-in-iis-express
Julie
Please login first to submit.
