Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error : Member modifier 'static' must precede the member type and name UnoApp1 (net8.0-desktop) #19015

Closed
blackholeearth opened this issue Dec 5, 2024 · 14 comments
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification

Comments

@blackholeearth
Copy link

blackholeearth commented Dec 5, 2024

Current behavior

i created new project. Edit Proj File ->
disabled everyplatform except --desktop (which i assume is wpf) ..

i only want it to work on wpf ... its not running...

i see this error

Error (active)	
CS1585	
Member modifier 'static' must precede the member type and name	UnoApp1 (net8.0-desktop)	

D:\..........\UnoApp1\UnoApp1\obj\Debug\net8.0-desktop\Uno.Extensions.Markup.Analyzers\Uno.Extensions.Markup.Analyzers.Generators.HotReloadModuleInitializerGenerator\UnoApp1.MarkupModuleInitializer.g.cs	13	

question?
does this work for only wpf ,,,, witout installing maui workload..

currently i only installed desktop workload.
win11 latest sdk

edit
i have installed maui .. i am still getting error..

i think this is related to generators.. its generating buggy code..

Expected behavior

it should work..

How to reproduce it (as minimally and precisely as possible)

create a uno porject > press f5

Environment

windows 11

NuGet package version(s)

Adsız

Affected platforms

Skia (WPF)

IDE

vs 2022 - v17.11.5

image

Relevant plugins

No response

Anything else we need to know?

No response

@blackholeearth blackholeearth added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Dec 5, 2024
@blackholeearth blackholeearth changed the title i created new project. disabled everyplatform except --desktop (which i assume is wpf) .. i only want it to work on wpf ... its not running... disabled everyplatform except --desktop (which i assume is wpf) .. i only want it to work on wpf ... its not running... Dec 5, 2024
@DevTKSS
Copy link
Contributor

DevTKSS commented Dec 6, 2024

did you run uno-check successfully?

@blackholeearth
Copy link
Author

blackholeearth commented Dec 6, 2024

the point is .. i dont wanna download maui or android sdk s which i will not use ....
i want to start lean just with desktop platform wpf ...... with LESS GB downloads to waste...

if i like uno platform... i might go ALL in... Download those big SDK Files,,, LATER..


did you run uno-check successfully?

https://platform.uno/docs/articles/external/uno.check/doc/using-uno-check.html?tabs=windows#command-line-arguments

cmd:: uno-check target skiawpf

result:: it says all good.. but i cant run??????

image

build result:: F5

Adsız

@blackholeearth blackholeearth changed the title disabled everyplatform except --desktop (which i assume is wpf) .. i only want it to work on wpf ... its not running... Member modifier 'static' must precede the member type and name UnoApp1 (net8.0-desktop) -----disabled everyplatform except --desktop (which i assume is wpf) .. i only want it to work on wpf .. Dec 6, 2024
@blackholeearth blackholeearth changed the title Member modifier 'static' must precede the member type and name UnoApp1 (net8.0-desktop) -----disabled everyplatform except --desktop (which i assume is wpf) .. i only want it to work on wpf .. error : Member modifier 'static' must precede the member type and name UnoApp1 (net8.0-desktop) -----disabled everyplatform except --desktop (which i assume is wpf) .. i only want it to work on wpf .. Dec 6, 2024
@blackholeearth
Copy link
Author

i think this is full command which i dont need... but here you go...

cmd:: uno-check

yes it finds missing things .

1
2
3

@DevTKSS
Copy link
Contributor

DevTKSS commented Dec 6, 2024

Dont know if this is even possible to not do, but could you update your visual studio at least (e.g. from its installer) and install the uno extension from the vs marketplace? this could maybe add the needed uno sdk, which seems to also be skipped
if this not works, someone of the uno team might have a look on your case, dont know if it is possible to do what you want

@DevTKSS
Copy link
Contributor

DevTKSS commented Dec 7, 2024

Just read "winforms" somewhere in your text...
Dont know if you read this already in docs or similar, uno is mostly building on top of winui and wpf is supported via skia as far as i know (no .net Framework, check uno docs for that). I am normally building to desktop target instead of directly windows, but the main difference beside the targets themselves you should look into is the markup for ui you want to use (in my own opinion xaml has more resources so far) which is xaml or c# and the application structure you might want to use. For the structure, you can also choose codebehind, but very less guides are doing so and the mvvm might be a good start. Then you will have to choose your ui styles library which is material 3 (google made) or fluent, but as far as i did see, you have more options when choosing material because of the theme resources you can define more freely

@blackholeearth blackholeearth changed the title error : Member modifier 'static' must precede the member type and name UnoApp1 (net8.0-desktop) -----disabled everyplatform except --desktop (which i assume is wpf) .. i only want it to work on wpf .. error : Member modifier 'static' must precede the member type and name UnoApp1 (net8.0-desktop) Dec 7, 2024
@DevTKSS
Copy link
Contributor

DevTKSS commented Dec 7, 2024

@blackholeearth would you mind to maybe add comments to your issue here instead of changing its title every few hours/every day? What you are described later is not at all matching the title so maybe you should update this and also add the issue you are confronted with at latest state here as comment for possible uno team members to better& more quickly see whats up to this issue, so they can help you at best they can

@blackholeearth
Copy link
Author

blackholeearth commented Dec 7, 2024

issue is unrelated to wpf ... ,, i still see that error , even if i create new uno App from Scratch... i think its about nuget dll version mismatch.....

uno cant understand that...

i just gave up this. wont use ... :((

trying to learn maui CS markup. from james monte-magno from youtube... ...

can close this if you want...

@blackholeearth blackholeearth closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2024
@jeromelaban
Copy link
Member

jeromelaban commented Dec 9, 2024

@blackholeearth It looks like you're having some sort of .NET version mismatch when building. We're currently upgrading our experience to make uno-check more specialized to the solution you're building, but could you try running this:

uno-check --tfm net9.0-desktop

This will run only for the desktop and not install everything else. The "wpf" target you've been using has been deprecated in Uno 5.3, but our documentation is lagging a bit.

Once you've run it, can you try to run the following in the folder that contains the csproj:

dotnet build /bl

Then post the msbuild.binlog file as a zip file here?

Thanks!

@jeromelaban jeromelaban reopened this Dec 9, 2024
@jeromelaban jeromelaban added the triage/needs-information Indicates an issue needs more information in order to work on it. label Dec 10, 2024
@blackholeearth
Copy link
Author

msbuild.zip

@github-actions github-actions bot removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Dec 11, 2024
@jeromelaban
Copy link
Member

Thanks for the update!

It looks like there's something in the environment that causes this issue to happen, and could you go there:

image

And post the contents of the file that opens when you double click on it?

Thanks!

@jeromelaban jeromelaban added the triage/needs-information Indicates an issue needs more information in order to work on it. label Dec 11, 2024
@blackholeearth
Copy link
Author

blackholeearth commented Dec 11, 2024

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace UnoApp1
{
    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
    ınternal static partial class __MarkupModuleInitializer
    {
        [global::System.Runtime.CompilerServices.ModuleInitializer]
        public static void Initialize()
        {
            #if !IS_HOT_RELOAD_DISABLED && (DEBUG || IS_HOT_RELOAD_ENABLED)
	var isHotReloadEnabled = true;
#else
	var isHotReloadEnabled = false;
#endif
	global::Uno.Extensions.Markup.Internals.ModuleConfiguration.Configure("UnoApp1", isHotReloadEnabled);        }
    }
}

photo

Ekran görüntüsü 2024-12-12 012516

@github-actions github-actions bot removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Dec 11, 2024
@jeromelaban
Copy link
Member

This is a very interesting bug! I'm guessing that you're on a Turkish system, which may explain why there's the ınternal instead of internal.

It should be easy to fix, we'll take a look and push a new update to our Uno 5.5.

Thanks for the troubleshooting!

@blackholeearth
Copy link
Author

blackholeearth commented Dec 12, 2024

so should i wait new vs2022 uno extension update??

or just wait it in the nuget packages??

@jeromelaban
Copy link
Member

It will be an uno.sdk package update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

No branches or pull requests

3 participants