有时我的构建会因此错误而失败.
0>MSBUILD : error MSB4166: Child node "3" exited prematurely. Shutting down.
Run Code Online (Sandbox Code Playgroud)
它似乎是完全随机的,我无法随意重现它.我正在运行VS2010 Win7 x64 MSBuild 4.0,但这个问题似乎是平台和操作系统无关.我正在并行构建解决方案(/ m switch + BuildInParallel = True),我不想禁用此功能,因为我正在编译包含800多个项目的应用程序.知道怎么解决吗?
编辑:当我安装.NET 4.5开发人员预览时,MSBuild 4.5中的错误日志记录得到了改进,现在错误字符串如下所示:
error MSB4166: Child node "3" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt
Run Code Online (Sandbox Code Playgroud)
我可以在Temp文件夹中找到错误日志文件.这是MSBuild _*.failure.txt文件的内容:
System.InvalidOperationException: BuildEventArgs has formatted message while serializing!
at Microsoft.Build.Framework.LazyFormattedBuildEventArgs.WriteToStream(BinaryWriter writer)
at Microsoft.Build.Framework.BuildMessageEventArgs.WriteToStream(BinaryWriter writer)
at Microsoft.Build.Shared.LogMessagePacketBase.WriteToStream(INodePacketTranslator translator)
at Microsoft.Build.BackEnd.NodeEndpointOutOfProcBase.PacketPumpProc()
Run Code Online (Sandbox Code Playgroud) 我在Android上的启动画面有问题.在长时间应用程序启动期间向用户显示启动画面,但活动背景始终为黑色.我的意思是背景位图(启动图像)是可见的,但背景是黑色而不是白色.我正在使用具有透明度的PNG图像.
是)我有的:
[Activity(MainLauncher = true, Theme = "@style/Theme.Splash", NoHistory = true)]
public class SplashScreen : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Do your app initialization here
// Other long running stuff
// Run app when done
StartActivity(typeof(MainForm));
}
}
Run Code Online (Sandbox Code Playgroud)
<resources>
<style name="Theme.Splash" parent="@android:style/Theme.Holo.Light">
<item name="android:windowBackground">@drawable/splash_centered</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/splash"
android:gravity="center"
android:background="@color/white"> <!-- this is ignored -->
Run Code Online (Sandbox Code Playgroud)
问题: 正如你所看到的,我正在使用Theme.Holo.Light作为父主题,我在我的应用程序的其余部分使用它.Holo光使用白色背景.此白色背景不适用于SplashActivity背景.SplashActivity背景总是黑色的. 背景位图(启动图像)可见,但背景为黑色而不是白色.我正在使用具有透明度的PNG图像.
问题: 如何在SplashScreen活动中设置默认的Holo.Light主题背景颜色(白色)?
注意: 我使用的是Xamarin.Android,但Android平台的样式很常见.Android版本4及更高版本.
我如何获得microsoft unity来"构造"给定接口类型的类列表.
很简单的例子:
List<IShippingCalculation> list = new List<IShippingCalculation>();
list.Add(new NewYorkShippingCalculation());
list.Add(new FloridaShippingCalculation());
list.Add(new AlaskShippingCalculation());
//Not What I want
public void calcship(List<IShippingCalculation> list)
{
var info = new ShippingInfo(list);
info.CalculateShippingAmount(State.Alaska)
}
//Somehow in unity, must i do this for all the concrete classes?
//how does it know to give a list.
Container.RegisterType<IShippingInfo,new AlaskaShippingCalculation()>();??
//What I want
public void calcship(IShippingInfo info)
{
info.CalculateShippingAmount(State.Alaska)
}
Run Code Online (Sandbox Code Playgroud)
谢谢!
我不知道如何指定正确的掩码来在TFS2010构建定义中搜索我的测试程序集.我没有使用默认的Binaries文件夹作为输出程序集.每个测试项目都有自己的bin\Debug或bin\Release输出文件夹.如果我使用默认掩码**\*test*.dll我的测试失败并出现此错误:
API restriction: The assembly 'file:///E:\Builds\....\obj\Debug\xxx.IntegrationTests.dll'
has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
Run Code Online (Sandbox Code Playgroud)
这是因为**\*test*.dll掩码将在bin\Debug和obj\Debug文件夹中找到同一程序集的多个结果.
我试图更改此掩码以排除obj\Debug文件夹并仅使用bin:
**\bin\Debug\*test*.dll
**\bin\**\*test*.dll
**\Debug\*test*.dll
Run Code Online (Sandbox Code Playgroud)
但FindMatchingFiles活动总是返回0结果.
它只在我通过测试程序集的完整路径时才有效.
如果我想从测试程序集搜索中排除obj\Debug文件夹,那么正确的掩码是什么?
解决方法:
我仍在使用FindMatchingFiles活动,但我必须使用以下参数添加Assign活动:
To - testAssemblies
From - testAssemblies.Where(Function(o) Not o.Contains("\obj\")).ToList()
Run Code Online (Sandbox Code Playgroud)
我正在以这种方式过滤"obj"文件夹中找到的所有测试程序集.
我可以以某种方式在视图组件中提交表单吗?我知道部分观点是不可能的.View组件有自己的控制器,所以这个问题的目标是我是否可以使用这个控制器来提交由组件视图呈现的表单.
在MVC6视图组件docs中没有提到它.所以这是不可能的,我猜,但也许我错了:)
我们有两个可用于我们应用程序的TFS构建服务器(构建控制器).构建在构建定义中按照配置触发.每个构建都通过"构建默认值"页面配置到特定的构建控制器.
假设我们有一个门禁的值机版本.建设时间为30分钟,每小时3次办理登机手续.通常,这些3门控登记版本在构建控制器1上触发,其他构建控制器2处于空闲状态.
如果正在使用build controller1,如何在构建控制器2上触发gated check-in构建?
是否可以使用最短的构建队列对构建服务器上的构建进行排队?如何在构建控制器上配置负载平衡?
编辑:我在这里找到了TFS2008的可能解决方案.我正在寻找适用于TFS2010的解决方案
tfs2010 ×2
tfsbuild ×2
android ×1
asp.net-core ×1
c# ×1
msbuild ×1
msbuild-4.0 ×1
mstest ×1
tfs ×1
xamarin ×1