Comments (8)
Dear Herdo
I have asking to you.
Could you help to fix the problem of AdaptiveTriggerLibrary with UWP Target SDK=1903 ?
I believe, You can have good skip to do it.
I want to use this library.
Please ...
Kazuhiko Nakayama ( Japan )
from adaptivetriggerlibrary.
@bidasknakayama I tried to reproduce the problem with a blank UWP app. Everything works fine, when adding the NuGet package.
Please provide more information, e.g. your Windows version and an example project, where I can reproduce the problem.
from adaptivetriggerlibrary.
### Here is step to reproduce the error.
- Download your "AdaptiveTriggerLibrary" from Github ( I used ZIP )
- Open it with Visual Studio ( I used 2019, 2017 )
- in Solution Explorer , Open property of "AdaptiveTriggerLibrary" project.
in "Library" tab, Change "Target version" to "Windows 10, version 1903 ( 10.0 Build 18362 )"
in "Library" tab, Change "Min version" to "Windows 10, version 1809 ( 10.0 Build 17763 )"
SDK Download is here :
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk - in Solution Explorer , Open property of "AdaptiveTriggerLibrary.TryOut" project.
Do same setting with (3) - Nuget package, I did not update. Even if we update all nugets, It has same result.
- Build "AdaptiveTriggerLibrary.TryOut" ( I used x64 , debug )
- I get this error.
NU1201: Project AdaptiveTriggerLibrary is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240). Project AdaptiveTriggerLibrary supports: uap10.0.17763 (UAP,Version=v10.0.17763) NU1201: Project AdaptiveTriggerLibrary is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-arm. Project AdaptiveTriggerLibrary supports: uap10.0.17763 (UAP,Version=v10.0.17763) NU1201: Project AdaptiveTriggerLibrary is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-arm-aot. Project AdaptiveTriggerLibrary supports: uap10.0.17763 (UAP,Version=v10.0.17763) NU1201: Project AdaptiveTriggerLibrary is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x64. Project AdaptiveTriggerLibrary supports: uap10.0.17763 (UAP,Version=v10.0.17763) NU1201: Project AdaptiveTriggerLibrary is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x64-aot. Project AdaptiveTriggerLibrary supports: uap10.0.17763 (UAP,Version=v10.0.17763) NU1201: Project AdaptiveTriggerLibrary is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x86. Project AdaptiveTriggerLibrary supports: uap10.0.17763 (UAP,Version=v10.0.17763) NU1201: Project AdaptiveTriggerLibrary is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x86-aot. Project AdaptiveTriggerLibrary supports: uap10.0.17763 (UAP,Version=v10.0.17763) NuGet package restore failed. Please see Error List window for detailed warnings and errors. 1>------ Build started: Project: AdaptiveTriggerLibrary, Configuration: Debug Any CPU ------ 1>D:\develop\visualstudio2\tmp\AdaptiveTriggerLibrary-master\AdaptiveTriggerLibrary\Triggers\UserInterfaceTriggers\FullScreenTrigger.cs(73,31,73,44): warning CS0618: 'ApplicationView.IsFullScreen.get' is obsolete: 'To check full screen mode, use IsFullScreenMode. To check if the view is adjacent to both edges, use AdjacentToLeftDisplayEdge and AdjacentToRightDisplayEdge. For more info, see MSDN.' 1> AdaptiveTriggerLibrary -> D:\develop\visualstudio2\tmp\AdaptiveTriggerLibrary-master\AdaptiveTriggerLibrary\bin\Debug\AdaptiveTriggerLibrary.dll 2>------ Build started: Project: AdaptiveTriggerLibrary.TryOut, Configuration: Debug x86 ------ 2>MSBUILD : error MSB4166: Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in "C:\Users\nakayama\AppData\Local\Temp\" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory. 2>MSBUILD : error MSB4166: C:\Users\nakayama\AppData\Local\Temp\MSBuild_pid-19764_ed3b5f093c674a0e98e37b9e41250ff3.failure.txt: 2>MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 19764: 2>MSBUILD : error MSB4166: ===================== 2>MSBUILD : error MSB4166: 2019/06/17 10:50:22 2>MSBUILD : error MSB4166: System.IO.IOException: Pipe is broken. 2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode) 2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.BeginWriteCore(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state) 2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count) 2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count) 2>MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue
1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)
2>MSBUILD : error MSB4166: ===================
2>MSBUILD : error MSB4166:
2>MSBUILD : error MSB4166:
2>MSBUILD : error MSB4166: C:\Users\nakayama\AppData\Local\Temp\MSBuild_pid-6356_62751748b3764572ba4f9a6b8a9eccf0.failure.txt:
2>MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 6356:
2>MSBUILD : error MSB4166: =====================
2>MSBUILD : error MSB4166: 2019/06/17 10:50:22
2>MSBUILD : error MSB4166: System.IO.IOException: Pipe is broken.
2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode)
2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.BeginWriteCore(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state)
2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count)
2>MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump) 2>MSBUILD : error MSB4166: =================== 2>MSBUILD : error MSB4166: 2>MSBUILD : error MSB4166: 2>MSBUILD : error MSB4166: C:\Users\nakayama\AppData\Local\Temp\MSBuild_pid-9388_61eab6f51d604b6cb0b53169c1eccd5a.failure.txt: 2>MSBUILD : error MSB4166: UNHANDLED EXCEPTIONS FROM PROCESS 9388: 2>MSBUILD : error MSB4166: ===================== 2>MSBUILD : error MSB4166: 2019/06/17 10:50:22 2>MSBUILD : error MSB4166: System.IO.IOException: Pipe is broken. 2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode) 2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.BeginWriteCore(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state) 2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count) 2>MSBUILD : error MSB4166: at System.IO.Pipes.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count) 2>MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.RunReadLoop(Stream localReadPipe, Stream localWritePipe, ConcurrentQueue
1 localPacketQueue, AutoResetEvent localPacketAvailable, AutoResetEvent localTerminatePacketPump)
2>MSBUILD : error MSB4166: ===================
2>MSBUILD : error MSB4166:
2>MSBUILD : error MSB4166:
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========`
### My investigation
I thought, This is not your fault.
Microsoft may change rule of DependencyProperty.
Your trigger class has DependencyProperty in base class.
- Condition
- ConditionModifiers
Again, This valuable is in base class.
With SDK 1903, Compiler can not find your DependencyProperty in base class,
This is very strange behavior.
It maybe bug of Compiler.
To pass build with SDK 1903, I have to change your code like this.
To put DependencyProperty (Condition,ConditionModifier), I move both valuable to Top class ( WindowHeightTrigger ).
here is my fixed project
https://drive.google.com/file/d/1uQMRn6zLKV0XusChXpP4ZvBhYudYCLD5/view?usp=sharing
Please see code :
- "MultiTrigger.cs"
- "WindowHeightTrigger.cs"
- "WindowWidthTrigger.cs"
`public double Condition
{
get { return (double)GetValue(ConditionProperty); }
set { SetValue(ConditionProperty, value); }
}
public static readonly DependencyProperty ConditionProperty =
DependencyProperty.Register("Condition", typeof(double), typeof(WindowHeightTrigger), new PropertyMetadata(default(double), ConditionUpdate));
public static void ConditionUpdate(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var obj = (WindowHeightTrigger)d;
if (obj != null)
{
obj._Condition = (double)e.NewValue;
}
}
public IComparableModifier ConditionModifier
{
get { return (IComparableModifier)GetValue(ConditionModifierProperty); }
set { SetValue(ConditionModifierProperty, value); }
}
public static readonly DependencyProperty ConditionModifierProperty =
DependencyProperty.Register("ConditionModifier", typeof(IComparableModifier), typeof(WindowHeightTrigger), new PropertyMetadata(default(IComparableModifier), ConditionModifierUpdate));
public static void ConditionModifierUpdate(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var obj = (WindowHeightTrigger)d;
if (obj != null)
{
obj._ConditionModifier = (IComparableModifier)e.NewValue;
}
}`
from adaptivetriggerlibrary.
@bidasknakayama I added a new TryOut.App for the target version 1903 (https://github.com/Herdo/AdaptiveTriggerLibrary/tree/master/AdaptiveTriggerLibrary.TryOut.1903).
It works fine with a new blank app.
The issue seems to be that changing the target version on an existing project doesn't set all the correct properties for it to work out. If you compare the two *.csproj files of both tryout apps, you'll be able to find the switches that prevent the compilation.
from adaptivetriggerlibrary.
I tried with your "Tryout.1903" project.
-The "Tryout.1903" project is "Target=18362(=1903), Min=10240)". It worked.
-If I switch Target=18362(=1903) and Min = 17763(=1809). Not work.
-If I switch Target=17763(=1809) and Min = 17763(=1809). Work !
There is still problem.
in my project, I can not use Min=10240. because Other library do not support so old SDK. then, I have to raise Minimum version to 1809.
If I remove all "ConditionModifier=??" and "Condition=??" in MainPage.xmal,
Build can success. But VisualState only can work as default value.
from adaptivetriggerlibrary.
Hmmm okay. Did you get it to work with the dependency property on the base class AdaptiveTriggerBase<TCondition, TConditionModifier>
?
If not, I'd rather wait for the compiler to receive a fix, than modifying each and every trigger.
from adaptivetriggerlibrary.
Thank you for your time. I found the cause. It's MSBuild problem , not your code.
< I reported this to Microsoft forum >
To understand the problem, I made a simple project.
https://drive.google.com/file/d/1eI6wXfLAEou6R3cPLqSiJN0xHq_KowA_/view?usp=sharing
please use it and test it.
This bug happen When compiling with “Target SDK 1903, Minimum SDK 1809” only… (A)
I will call it as “Condition(A)” in below.
It is a simple StateTrigger project.
It has 2 StateTrigger.
- WorkTrigger
- BugTrigger
(1) WorkTrigger has a base class. Base class is IN same folder with parent.
“Same” folder is important.
If we use this trigger in “VisualStateManager”, We can compile with Condition (A).
(2) BugTrigger is also same trigger class. Code is same with WorkTrigger.
Different point is parent class location.
Parent Class is in bugfolder/folder1/folder2.
Base class is in Bugfolder
You can not compile it with Condition (A).
How to compile it ?
There is 3 ways.
[Way 1]
If you change SDK Target = 1809, Min = 1809,
You can compile.
This is not good, Because I want to use Target = 1903 !!
[Way 2]
if we move BaseBug.cs file to same location with BugTrigger.cs.
and Change namespace of BaseBug.cs as same as BugTrigger.cs
namespace MSBuildBug2.bugFolder.folder1.folder2
[Way 3]
Remove BugTrigger in VisualState in MainView.xaml file.
You can compile it.
THis is compiler bug… I think.
Compiler( MSBuild ) show error
MSBUILD : error MSB4166: Child node “2”
with this problem, I can not compile many projects.
Please fix it.
Kazu, Japan.
from adaptivetriggerlibrary.
Now, Microsoft realized the bug.
Here is my post and I post to feedback-hub too.
They will fix.
https://developercommunity.visualstudio.com/content/problem/612363/msbuild-can-not-find-dependencyproperty-when-folde.html
Until their fixing,
in MainPage.xaml,
If we add this line, Build on 1903 success.
This is no meaning code. but we can avoid the bug...
xmlns:path1="using:AdaptiveTriggerLibrary.Triggers"
thank you
from adaptivetriggerlibrary.
Related Issues (11)
- NuGet unable to resolve AdaptiveTriggerLibrary (>= 1.1.1) HOT 3
- Error When Using User Interface Control Width Trigger
- Recompile in .NET Standard 2.1 to support Uno Platform
- StateTrigger with bound bool property HOT 3
- AdaptiveTriggers that set TargetElement in code-behind must be nulled otherwise they cause a memory leak HOT 2
- Potential memory leak with Modifiers when added as Resources to individual pages HOT 2
- How to use ConnectivityTrigger from AdaptiveTriggerLibrary? HOT 6
- ConnectivityTrigger error on UWP HOT 6
- Using multiple ControlWidthTrigger HOT 2
- MultiTriggers not performing as expected when used in several visual states
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adaptivetriggerlibrary.