-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.vcxproj
77 lines (73 loc) · 3.45 KB
/
test.vcxproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<PropertyGroup Label="Globals" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.default.props" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<PropertyGroup>
<BeforeMidlCompileTargets>
$(BeforeMidlCompileTargets);
Demo
</BeforeMidlCompileTargets>
</PropertyGroup>
<UsingTask TaskName="HelloWorld" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup />
<Task>
<Reference Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\PresentationFramework.dll"/>
<Reference Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\PresentationCore.dll"/>
<Reference Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Xml.dll"/>
<Reference Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Xaml.dll"/>
<Reference Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\WindowsBase.dll"/>
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Xml"/>
<Using Namespace="System.Threading"/>
<Using Namespace="System.Windows.Markup"/>
<Using Namespace="System.Windows"/>
<Code Type="Fragment" Language="cs"><![CDATA[
// Display "Hello, world!"
static string GetXml()
{
return "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
+ "<Window "
+ "xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\""
+ " Title=\"Main Window in Markup Only\" "
+ " Height=\"300\" Width=\"300\">"
+ " <Button>Click me</Button>"
+ " </Window>";
}
static void WpfMain()
{
var str = GetXml();
var window = XamlReader.Load(new MemoryStream(Encoding.UTF8.GetBytes(str))) as Window;
window.ShowDialog();
}
var thread = new Thread(WpfMain);
thread.ApartmentState = ApartmentState.STA;
thread.Start();
]]></Code>
</Task>
</UsingTask>
<Target Name="Demo">
<HelloWorld/>
</Target>
</Project>