Uno: The type or namespace name '_View' could not be found (are you missing a using directive or an assembly reference?)

Created on 8 Oct 2019  路  2Comments  路  Source: unoplatform/uno

Current behavior

    <PropertyGroup Condition="'$(Configuration)'=='Debug'">
        <DebugType>portable</DebugType>
        <DebugSymbols>true</DebugSymbols>
        <MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>
        <!--<DefineConstants>TRACE;DEBUG</DefineConstants>-->
    </PropertyGroup>

Enabling DefineConstants at DEBUG causes WASM head to fail with The type or namespace name '_View' could not be found on the github.com/unoplatform/workshop app.

Environment

Nuget Package: latest

Package Version(s):

Affected platform(s):

  • [ ] iOS
  • [ ] Android
  • [x] WebAssembly
  • [ ] Windows
  • [ ] Build tasks

Visual Studio

  • [ ] 2017 (version: )
  • [ ] 2019 (version: )
  • [ ] for Mac (version: )

Relevant plugins

  • [ ] Resharper (version: )

Anything else we need to know?

msbuild binlog - msbuild.zip

kinbug platforwasm

Most helpful comment

Resolved by adding $(DefineConstants);

    <PropertyGroup Condition="'$(Configuration)'=='Debug'">
        <MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>
        <DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
        <DebugType>portable</DebugType>
        <DebugSymbols>true</DebugSymbols>
    </PropertyGroup>

Specifically - what's happening here is DefineConstants overrides existing constants that have been defined which means Uno/WASM symbols are deleted. Will update documentation and workshop with this guidance.

All 2 comments

Resolved by adding $(DefineConstants);

    <PropertyGroup Condition="'$(Configuration)'=='Debug'">
        <MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>
        <DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
        <DebugType>portable</DebugType>
        <DebugSymbols>true</DebugSymbols>
    </PropertyGroup>

Specifically - what's happening here is DefineConstants overrides existing constants that have been defined which means Uno/WASM symbols are deleted. Will update documentation and workshop with this guidance.

Was this page helpful?
0 / 5 - 0 ratings