You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Folder in solution with name "Uno" causes namespace resolution errors #28
I'm trying to add Uno to an existing solution.
I "logically" created a Uno folder in the solution. I added MyApp.Uno.UPW, MyApp.Uno.iOS and MyApp.Uno.Shared projects with the proper nuget packages and references.
When I build the iOS project I had an error like:
The type or namespace name 'UI' does not exist in the namespace 'MyApp.Uno' (are you missing an assembly reference?)
I had to rename my folder to UnoApp and projects to MyApp.UnoApp.UWP etc to get it to compile.
👋 had the opportunity to dig into this and this is what I found.
File -> New "MyApp.Uno"
Update to latest pre-release of Uno.* packages
Building on WASM and Android results in
Error CS0234 The type or namespace name 'Extensions' does not exist in the namespace 'MyApp.Uno' (are you missing an assembly reference?) MyApp.Uno.Droid, MyApp.Uno.UWP, MyApp.Uno.Wasm, MyApp.Uno.iOS C:\code\unoplatform\MyApp.Uno\MyApp.Uno\MyApp.Uno.Shared\App.xaml.cs 32 Active
Adding global:: namespace to ConfigureFilters resolves
public App()
{
ConfigureFilters(global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory);
this.InitializeComponent();
this.Suspending += OnSuspending;
}
Android and WebAsm compile fine.
iOS untested, pending macOS configuration on Geoff's end due to Catalina release.
I was able to reproduce the issue in the above test case. The solution is to add global:: to ConfigureFilters to your existing applications. See geoffreyhuntley/uno-28@f15c8aa for a diff.
I'll raise a item on the backlog for devops to investigate/implement if the Visual Studio market place supports the notion of publishing pre-releases.
Build Log before adding global::
Android:
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Extensions' does not exist in the namespace 'Test2.Uno' (are you missing an assembly reference?) Test2.Uno.Droid C:\Users\ghuntley\Downloads\Test2.Uno\Test2.Uno\Test2.Uno.Shared\App.xaml.cs 32 Active
iOS:
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Extensions' does not exist in the namespace 'Test2.Uno' (are you missing an assembly reference?) Test2.Uno.iOS C:\Users\ghuntley\Downloads\Test2.Uno\Test2.Uno\Test2.Uno.Shared\App.xaml.cs 32 Active
UWP:
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Extensions' does not exist in the namespace 'Test2.Uno' (are you missing an assembly reference?) Test2.Uno.UWP C:\Users\ghuntley\Downloads\Test2.Uno\Test2.Uno\Test2.Uno.Shared\App.xaml.cs 32 Active
WASM:
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Extensions' does not exist in the namespace 'Test2.Uno' (are you missing an assembly reference?) Test2.Uno.Wasm C:\Users\ghuntley\Downloads\Test2.Uno\Test2.Uno\Test2.Uno.Shared\App.xaml.cs 32 Active
Activity
jeromelaban commentedon Jun 16, 2018
Looks like the Uno source generators are missing some
global::prefixes :)The best practice for now is to avoid
Uno,SystemandAndroidin the project's name.ghuntley commentedon Oct 9, 2019
👋 had the opportunity to dig into this and this is what I found.
global:: namespaceto ConfigureFilters resolvesPR raised over at #1771
peternary commentedon Oct 10, 2019
I'm still getting this issue with latest Uno build. Sample project attached.
Test2.Uno.zip
ghuntley commentedon Oct 10, 2019
Sorry to hear that Peter, thank-you for attaching a test case - investigating.
ghuntley commentedon Oct 10, 2019
Howdy,
I was able to reproduce the issue in the above test case. The solution is to add
global::toConfigureFiltersto your existing applications. See geoffreyhuntley/uno-28@f15c8aa for a diff.The PR at #1771 fixes the problem in the solution template generator and next time we publish a stable release that fix will be included. We currently don't automatically publish pre-release versions of the Visual Studio extension to the market place but do publish them as artifacts over at https://github.com/unoplatform/uno/pull/1213/files
I'll raise a item on the backlog for devops to investigate/implement if the Visual Studio market place supports the notion of publishing pre-releases.
Build Log before adding global::
Android:
iOS:
UWP:
WASM:
ghuntley commentedon Oct 10, 2019
Let me know if this doesn't resolve your issues!
ci: changed IsPackable to true (unoplatform#28)
chore: MOAR LOGGING
chore: MOAR LOGGING
perf(webgpu): solid/rrect scroll restamp via the transform table (gap…