我知道之前已经问过这个问题,但是没有一个建议的决议对我有用,所以我会再次提出这个问题并希望得到新的建议.我读过的一些文章:
带有黄色三角形的VS .Net参考 当我添加对MEF插件项目的引用时,为什么会出现警告图标? 黄色三角形图标中的感叹号(解决方案资源管理器中)
我的5个可移植库肯定都是针对相同的框架(我已经检查并重新检查,因为这是其中一个建议!):
到目前为止我尝试/做过的事情:
这是我的一个便携式类库的一部分:
<ItemGroup>
<Reference Include="crypto">
<HintPath>..\..\..\packages\Portable.BouncyCastle.1.8.1\lib\portable-
net4+sl5+wp8+win8+wpa81+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10
\crypto.dll
</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\..\packages\Newtonsoft.Json.8.0.3\lib\portable-
net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll
</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http">
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-
net40+sl4+win8+wp71+wpa81\System.Net.Http.dll
</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Extensions">
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-
net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll
</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Primitives">
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-
net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll
</HintPath>
<Private>True</Private>
</Reference>
Run Code Online (Sandbox Code Playgroud)
我的物理项目路径是:
C:\ XXXX\XXXXXX\XXXXX-XXXXXXX
所以以bouncycastle为例,基于上述情况,我假设完整路径看起来像这样:
C:\ XXXX\XXXXXX\XXXXX-XXXXXXX \包\ Portable.BouncyCastle.1.8.1\LIB \便携式NET4 + SL5 …
自从在商店(测试版和私有版)中为Windows 10部署我的UWP应用程序后,我无法再将其部署到我的手机(ARM),平板电脑模拟器(x86)和本地计算机(Surface Pro 3)进行测试.
我重新启动了我的手机和我的SP3,但我仍然遇到同样的错误:
Severity Code Description Project File Line Suppression State
Error Error : DEP0001 : Unexpected Error: Install failed.
Please contact your software vendor. (Exception from HRESULT: 0x80073CF9)
Run Code Online (Sandbox Code Playgroud)
我用Google搜索了错误,发现了这篇文章:
https://msdn.microsoft.com/en-us/library/windows/desktop/hh973484(v=vs.85).aspx
根据这篇文章/页面,我应该检查AppXDeployment-Server日志
ERROR_INSTALL_FAILED 0x80073CF9
Package install failed. Contact the software vendor.
Check the AppXDeployment-Server event log for more info.
Run Code Online (Sandbox Code Playgroud)
我做了,但我找不到任何有用的东西.我刚尝试重新部署到我的手机,没有添加任何条目.此日志中的最后一个条目是从现在开始的52分钟开始.我也检查了AppXDeployment日志,也没有!
是否与视觉工作室生成了新证书有关?我不确定是否诚实.
当我尝试在模拟器或本地计算机上部署它时,我得到一个不同的错误:
Severity Code Description Project File Line Suppression State
Error Error : DEP0700 : Registration of the app failed. An
internal error occurred with error 0x80073D05. See …Run Code Online (Sandbox Code Playgroud) 有人知道吗:
在安装新版本的安装程序之前,如何强制wix安装程序卸载以前安装的任何先前副本,无论是次要版本还是主要版本.
如果1)在运行新的次要/主要设置时无法完成,我是否至少可以显示一条消息,说明检测到以前的版本并且应首先卸载并取消设置?
谢谢.
更新:
我已将以下内容添加到我的settings.wxi中
<Upgrade Id="$(var.UpgradeCode)">
<!-- Populate NEWERPRODUCTFOUND if there is an installed
package with the same upgrade code
and version is > the version being installed -->
<UpgradeVersion
Minimum="$(var.CurrentVersion)"
IncludeMinimum="no"
OnlyDetect="yes"
Language="1033"
Property="NEWERPRODUCTFOUND" />
<!-- Populate UPGRADEFOUND if there is an installed
package with the same upgrade code
and the version is between the earliest version defined
and the version being installed -->
<UpgradeVersion
Minimum="$(var.FirstVersion)"
IncludeMinimum="yes"
Maximum="$(var.CurrentVersion)"
IncludeMaximum="no"
Language="1033"
Property="PREVIOUSVERSIONSINSTALLED" />
</Upgrade>
Run Code Online (Sandbox Code Playgroud)
我在MyProduct.wxs中定义了以下内容
<?define CurrentVersion="5.0.0.18"?>
<?define …Run Code Online (Sandbox Code Playgroud) 我正在将我们的.net业务对象库转换为PCL文件,以便它可以与Xamarin IOS/Android一起使用,虽然它主要包含POCO对象,但它也包含自定义异常,但这会引发错误.
采取典型的自定义异常:
[Serializable]
public class EncryptKeyNotFoundException : Exception
{
public EncryptKeyNotFoundException()
: base() { }
public EncryptKeyNotFoundException(string message)
: base(message) { }
public EncryptKeyNotFoundException(string format, params object[] args)
: base(string.Format(format, args)) { }
public EncryptKeyNotFoundException(string message, Exception innerException)
: base(message, innerException) { }
public EncryptKeyNotFoundException(string format, Exception innerException, params object[] args)
: base(string.Format(format, args), innerException) { }
protected EncryptKeyNotFoundException(SerializationInfo info, StreamingContext context)
: base(info, context) { }
}
Run Code Online (Sandbox Code Playgroud)
正如预期的那样,PCL不喜欢[Serializable]和SerializationInfo.虽然我可能会坚持使用[DataContract]而不是使用[Serialiable],但它仍然无法解决问题SerializationInfo.
反正有没有绕过这个问题?
谢谢. …
c# xamarin.ios xamarin.android portable-class-library xamarin
我对应该是什么样的模型或视图模型感到困惑,应该如何命名.
为简单起见,我将把INotifyPropertyChange它排除在外.
以下类显然是一个模型:
class CountryModel
{
public string Name { get; set; }
public string Location { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
您最常在网上看到的是视图模型定义如下:
class CountryViewModel
{
public CountryViewModel
{
// initialize data (not ideal place, I know, but keeping it simple!)
}
public ObservableCollection<CountryModel> Countries
{
private get;
set;
}
}
Run Code Online (Sandbox Code Playgroud)
为什么不是模型之上Countries,即CountriesModel,例如?为什么它被视为视图模型?
技术上应该如此吗?我们应该为视图模型设置另一个类吗?
class CountryViewModel
{
private ObservableCollection<CountryModel> _countries = new ....;
public CountryViewModel
{
}
public ObservableCollection<CountryModel> Countries
{
private get { return _countries …Run Code Online (Sandbox Code Playgroud) 我有清单即List<Field>.这个Field类包含一个代码和一个值属性以及其他字段,我希望能够使用linq来总结相同代码的所有值.
我知道我可以遍历我的列表并使用以下代码将其添加到字典中,但我确信必须有一个更简洁的方法来执行此操作:
if (totals.ContainsKey(code))
{
totals[code] += value;
}
else
{
totals.Add(code, value);
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我找到了类似的东西,但这应用于列表>这不是我所拥有的:
var result = Sales.SelectMany(d => d) // Flatten the list of dictionaries
.GroupBy(kvp => kvp.Key, kvp => kvp.Value) // Group the products
.ToDictionary(g => g.Key, g => g.Sum());
Run Code Online (Sandbox Code Playgroud)
来自本文[使用Linq in的总和<List<Dictionary<string, int>> ] 使用Linq在<List <Dictionary <string,int >>中的总和
有任何想法吗?我总是可以改变我的代码,Dictionary<string, Field>但我确信必须有一种方法来使用list和linq.
谢谢.
我有清单即List<Field>.这个Field类包含一个代码和一个值属性以及其他字段,我希望能够使用linq来总结相同代码的所有值.
我知道我可以遍历我的列表并使用以下代码将其添加到字典中,但我确信必须有一个更简洁的方法来执行此操作:
if (totals.ContainsKey(code))
{
totals[code] += value;
}
else
{
totals.Add(code, value);
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我找到了类似的东西,但这应用于列表>这不是我所拥有的:
var …Run Code Online (Sandbox Code Playgroud) 我的UWP应用程序在发布模式下崩溃并且在调试模式下工作正常,但我不能指出问题是什么,但我知道它与从System.Threading.Timer和MVVMLight引发事件的组合有关.
我创建了一个新的虚拟应用程序并使用相同的代码(ZXing.net.mobile我使用了2个可移植库,我使用了自己的用户控件,这是他们的简化版本 - 我使用的是事件而不是<Action>).这工作正常,我正在尝试更多的步骤,包括mvvmlight和导航,但到目前为止,我无法重现这个虚拟应用程序中的问题.
我得到的错误是:
Unhandled exception at 0x58C1AF0B (mrt100_app.dll) in Company.MyApp.App.exe:
0xC0000602: A fail fast exception occurred. Exception handlers will not be
invoked and the process will be terminated immediately.
Run Code Online (Sandbox Code Playgroud)
其次是:
Unhandled exception at 0x0107D201 (SharedLibrary.dll) in
Company.MyApp.App.exe: 0x00001007.
Run Code Online (Sandbox Code Playgroud)
查看"线程"窗口时,如果有帮助,则其中一个工作线程具有以下信息.
Not Flagged > 4012 0 Worker Thread <No Name>
System.Private.Interop.dll!System.Runtime.InteropServices.
ExceptionHelpers.ReportUnhandledError Normal
[External Code]
System.Private.Interop.dll!System.Runtime.InteropServices.ExceptionHelpers.
ReportUnhandledError(System.Exception e) Line 885
System.Private.Interop.dll!Internal.Interop.InteropCallbacks.ReportUnhandledError
(System.Exception ex) Line 17
System.Private.WinRTInterop.CoreLib.dll!Internal.WinRT.Interop.WinRTCallbacks.
ReportUnhandledError(System.Exception ex) Line 274
System.Private.CoreLib.dll!System.RuntimeExceptionHelpers.ReportUnhandledException
(System.Exception exception) Line 152
System.Private.Threading.dll!System.Threading.Tasks.AwaitTaskContinuation.
ThrowAsyncIfNecessary(System.Exception exc) …Run Code Online (Sandbox Code Playgroud) 我需要构建一个UWP应用程序,可以(手机/平板电脑)使用相机从电脑屏幕上读取QR条码.我需要在摄像头打开时检测QR条码,因为我不想截取(或类似)并将其保存到文件然后读取它.它需要在运行时检测.
是否有MIT许可证代码(在C#中)我可以在那里使用?
许多使用此功能的应用程序往往具有"目标"窗口,该窗口未使用整个屏幕.我怎样才能做到这一点?
有人能指出我正确的方向,我该怎么做?
非常感谢.
我刚刚创建了一个新的 MongoDB 帐户,现在尝试连接通过 MongoDB Compass 社区应用程序创建的免费集群,但显示“身份验证失败”错误。
\n\n这是我到目前为止检查过的:
\n\n在我的 MongoDB Clusters 部分,当我单击 Connect (\xe2\x80\xa6) 按钮时,它会为您提供各种选项。从那里,我选择“使用 MongoDB Compass 连接”并复制连接字符串。
指南针按预期检测到了这一点,并且信息自动填充到所有相关字段中,我还通过将密码复制/粘贴到相关字段中来填充密码。100% 确定它是正确的。
我检查了所使用的用户名确实被设置为管理员,确实如此。
我检查了我的身份验证数据库是否正确,确实如此。
我检查过我的公共 IP 是否已添加到白名单中,确实如此。我唯一注意到的是,当我添加公共 IP 地址时,它在末尾添加了 /32。是那个港口吗?
但我不太确定还需要测试什么来解决这个问题。
\n\n有什么建议么?
\n\n谢谢。
\n我CommandBar在XAML中将其IsOpen属性设置为true,因此每个按钮的文本都是可见的,因为我希望描述保持可见.
当我点击省略号按钮时,它会隐藏文本,第二次点击它时,我收到以下错误:
No installed components were detected. Cannot resolve TargetName HighContrastBorder.
用户界面有些尴尬,可能与此有关,但我无法弄清楚是什么或为什么:
正如您所看到的,我正在显示的各种按钮的按钮文字被截断:
代码方面,据我所知,它并没有什么特别之处:
<Page.BottomAppBar>
<CommandBar IsOpen="True"
ClosedDisplayMode="Compact"
IsSticky="True"
Visibility="{Binding
CommandBarViewModel.IsCommandBarVisible,
Converter={StaticResource BoolToVisibilityConverter}}"
Background="{ThemeResource SystemControlBackgroundAccentBrush}">
<AppBarButton
Icon="Add"
Label="Add"
Foreground="White"
Command="{Binding CommandBarViewModel.AddCommand}"
Visibility="{Binding CommandBarViewModel.IsAddVisible,
Converter={StaticResource BoolToVisibilityConverter}}"/>
<AppBarButton
Icon="Refresh"
Label="Refresh"
Foreground="White"
Command="{Binding CommandBarViewModel.RefreshListCommand}"
Visibility="{Binding
CommandBarViewModel.IsRefreshListVisible,
Converter={StaticResource BoolToVisibilityConverter}}"/>
</CommandBar>
</Page.BottomAppBar>
Run Code Online (Sandbox Code Playgroud)
没有InnerException,App.gics抛出异常
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached)
global::System.Diagnostics.Debugger.Break();
};
#endif
Run Code Online (Sandbox Code Playgroud)
关于我的问题的任何想法,即文本截止和未处理的异常?
谢谢
更新 - 1:
当我CommandBarViewModel.IsCommandBarVisible从Visible属性中删除binded属性()CommandBar并将其硬编码到时Visible,错误向下移动,而不是发生在App.gics中,它现在发生了它试图设置的第一个按钮的binded属性对...的可见度 …
c# ×4
uwp-xaml ×2
xaml ×2
dispatcher ×1
linq ×1
mongodb ×1
mvvm ×1
mvvm-light ×1
nuget ×1
uwp ×1
wix ×1
wix3.7 ×1
xamarin ×1
xamarin.ios ×1
zxing ×1