Skip to content

Commit

Permalink
Fix building in release config
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSandersonMS committed Nov 19, 2019
1 parent bb2f3f3 commit 29e3114
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ bin/
obj/
*.user
Debug/
Release/
packages/
artifacts/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you want to build the `WebWindow` library itself, you will need:
* Windows, Mac, or Linux
* Node.js (because `WebWindow.Blazor.JS` includes TypeScript code, so the build process involves calling Node to perform a Webpack build)
* If you're on Windows:
* Use Visual Studio with C++ support enabled. You *must* build in Debug/x64 configuration (*not* AnyCPU, which is the default).
* Use Visual Studio with C++ support enabled. You *must* build in x64 configuration (*not* AnyCPU, which is the default).
* If things don't seem to be updating, try right-clicking one of the `testassets` projects and choose *Rebuild* to force it to rebuild the native assets.
* If you're on macOS:
* Install Xcode so that you have the whole `gcc` toolchain available on the command line.
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
inputs:
solution: 'WebWindow.Native.sln'
platform: 'x64'
configuration: 'Debug'
configuration: '$(buildConfiguration)'
- task: CmdLine@2
displayName: 'Build Linux/macOS native assets'
condition: ne(variables.rid, 'windows-x64')
Expand Down
3 changes: 2 additions & 1 deletion src/WebWindow.Native/WebWindow.Native.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
Expand Down Expand Up @@ -143,6 +143,7 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/WebWindow.Native/WebWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ typedef char* UTF8String;

#ifdef _WIN32
#include <Windows.h>
#include <wrl.h>
#include <wrl\event.h>
#include <map>
#include <string>
#include <wil/com.h>
Expand Down
2 changes: 1 addition & 1 deletion src/WebWindow/WebWindow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PackageDescription>Open native OS windows hosting web UI on Windows, Mac, and Linux</PackageDescription>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<TargetFramework>netstandard2.1</TargetFramework>
<NativeOutputDir>..\WebWindow.Native\x64\Debug\</NativeOutputDir>
<NativeOutputDir>..\WebWindow.Native\x64\$(Configuration)\</NativeOutputDir>
<IsMacOS>$([MSBuild]::IsOsPlatform('OSX'))</IsMacOS>
<NativeAssetRuntimeIdentifier Condition="'$(OS)' == 'Windows_NT'" >win-x64</NativeAssetRuntimeIdentifier>
<NativeAssetRuntimeIdentifier Condition="'$(OS)' != 'Windows_NT' AND '$(IsMacOS)' != 'true'" >linux-x64</NativeAssetRuntimeIdentifier>
Expand Down

0 comments on commit 29e3114

Please sign in to comment.