Daddoon / BlazorMobile

Create full C# driven hybrid-apps for iOS, Android, UWP & Desktop with Blazor!
MIT License
413 stars 55 forks source link

Build error in latest preview #197

Closed sorainnosia closed 4 years ago

sorainnosia commented 4 years ago

the index.cshtml when generated to server_index.cshtml won't compile because the Html, MobileApp, RenderMode does not have the namespace

Severity Code Description Project File Line Suppression State Error CS0115 'Template.ExecuteAsync()': no suitable method found to override SRMobile.Blazor M:\FacialRecognition\SRMobile\SRMobile.Blazor\server_index.cshtml 1 Active Error CS0006 Metadata file 'M:\FacialRecognition\SRMobile\SRMobile.Blazor\bin\Debug\netstandard2.1\SRMobile.Blazor.dll' could not be found SRMobile.Blazor.Server M:\FacialRecognition\SRMobile\SRMobile.Blazor.Server\CSC 1 Active Error CS0006 Metadata file 'M:\FacialRecognition\SRMobile\SRMobile.Blazor\bin\Debug\netstandard2.1\SRMobile.Blazor.dll' could not be found SRMobile.Desktop M:\FacialRecognition\SRMobile\SRMobile.Desktop\CSC 1 Active Error CS0103 The name 'page' does not exist in the current context SRMobile.Blazor M:\FacialRecognition\SRMobile\SRMobile.Blazor\server_index.cshtml 1 Active Error CS0103 The name 'Html' does not exist in the current context SRMobile.Blazor M:\FacialRecognition\SRMobile\SRMobile.Blazor\server_index.cshtml 17 Active Error CS0246 The type or namespace name 'MobileApp' could not be found (are you missing a using directive or an assembly reference?) SRMobile.Blazor M:\FacialRecognition\SRMobile\SRMobile.Blazor\server_index.cshtml 17 Active Error CS0103 The name 'RenderMode' does not exist in the current context SRMobile.Blazor M:\FacialRecognition\SRMobile\SRMobile.Blazor\server_index.cshtml 17 Active Warning Two processes may be building this project at once. Lock file exists at path: M:\FacialRecognition\SRMobile\SRMobile.Android\obj\Debug\90.__lock SRMobile.Android
Warning NU1603 Xamarin.Android.GeckoView 0.1.1 depends on Xamarin.Android.Support.v7.Palette (>= 27.0.0) but Xamarin.Android.Support.v7.Palette 27.0.0 was not found. An approximate best match of Xamarin.Android.Support.v7.Palette 27.0.2 was resolved. SRMobile.Android M:\FacialRecognition\SRMobile\SRMobile.Android\SRMobile.Android.csproj 1
Error server_index.cshtml "Build actions" property is not set to 'None' in your Blazor WebAssembly project and may cause build failure. The "Build actions" property must be set to 'Content' only from an item link reference from a Blazor server-side project, if any. SRMobile.Blazor M:\FacialRecognition\SRMobile\SRMobile.Blazor\EXEC 1
Error MSB3073 The command "dotnet "C:\Users\70720820.nuget\packages\blazormobile.build\3.2.4-preview2.20160.5\tools\netcoreapp3.1/BlazorMobile.Build.dll" client-to-server-blazor-index --input "M:\FacialRecognition\SRMobile\SRMobile.Blazor" --project-file "M:\FacialRecognition\SRMobile\SRMobile.Blazor\SRMobile.Blazor.csproj"" exited with code -1. SRMobile.Blazor C:\Users\70720820.nuget\packages\blazormobile.build\3.2.4-preview2.20160.5\tools\GenerateBlazorMobileBuild.targets 35

Daddoon commented 4 years ago

Hello @sorainnosia

A specific Blazor version is written at the beginning of the BlazorMobile documentation. This mean that this specific version has been tested and compiled with BlazorMobile.

As the Blazor project is still under development at Microsoft, namespace, methods and others may be subject to change, that's why things can break if not tested or compiled against the right Blazor version.

An update will come soon.

Your compilation break because the namespace for the server_index.cshtml (intended for synchronizing your Server and WASM projects index's) has changed for the component renderer (i guess).

In the meantime: Just fallback to the previous Blazor version.

Daddoon commented 4 years ago

Forward this issue for the next release.

Daddoon commented 4 years ago

Well actually, your project error is not really a bug, everything was mentionned by BlazorMobile in your build.

Please read again your logs:

Error server_index.cshtml "Build actions" property is not set to 'None' in your Blazor WebAssembly project and may cause build failure. The "Build actions" property must be set to 'Content' only from an item link reference from a Blazor server-side project, if any

Closing.