我们正在使用新的开发机器并升级到Vista 64 Ultimate以利用我们的8gb内存.我们的经理希望我们在32位虚拟机中完成所有开发工作,以确保我们的代码不会出现问题.
有没有办法保证结果程序能在32位操作系统上运行?我不介意使用虚拟机,但我不喜欢他们如何强迫你回到"单一"监视器类型视图.我喜欢将我的VS工具栏移到我的其他显示器上.
编辑:我们正在使用Visual Studio 2005和2008,VB.NET和/或C#
编辑:使用Harpreet的答案,这些是我用来设置我的Visual Studio IDE来编译x86/32bit的步骤:
<New...>请享用.
谢谢,基思
我需要针对模式验证XML文件.XML文件是在代码中生成的,在我保存之前,我需要验证它是否正确.
我已经把问题解决了它最简单的元素,但我遇到了问题.
XML:
<?xml version="1.0" encoding="utf-16"?>
<MRIDSupportingData xmlns="urn:GenericLabData">
<MRIDNumber>MRIDDemo</MRIDNumber>
<CrewMemberIdentifier>1234</CrewMemberIdentifier>
<PrescribedTestDate>1/1/2005</PrescribedTestDate>
</MRIDSupportingData>
Run Code Online (Sandbox Code Playgroud)
架构:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="urn:GenericLabData" targetNamespace="urn:GenericLabData"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="MRIDSupportingData">
<xs:complexType>
<xs:sequence>
<xs:element name="MRIDNumber" type="xs:string" />
<xs:element minOccurs="1" name="CrewMemberIdentifier" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Run Code Online (Sandbox Code Playgroud)
ValidationCode :(这段代码来自我编写的一个简单的应用程序来测试验证逻辑.XML和XSD文件存储在磁盘上并从那里读取.在实际的应用程序中,XML文件已经作为XmlDocument存储在内存中对象和XSD将从内部Web服务器读取.)
private void Validate()
{
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;
//settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessInlineSchema;
//settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessSchemaLocation;
//settings.ValidationFlags |= XmlSchemaValidationFlags.ReportValidationWarnings;
settings.ValidationEventHandler += new ValidationEventHandler(OnValidate);
XmlSchemaSet schemas = new XmlSchemaSet();
settings.Schemas = schemas;
try
{
schemas.Add(null, schemaPathTextBox.Text);
using (XmlReader reader = …Run Code Online (Sandbox Code Playgroud) 我无法安装nuget pagckage
Microsoft.AspNet.Identity.Core.
当我运行install -package cmd时,我收到以下消息.它说我正在尝试使用.NET 4将软件包安装到一个项目中,但是软件包0没有引用它.使用VS2010 .NET v4
先感谢您.
下面是PM>文字:
PM>安装包Microsoft.AspNet.Identity.Core安装'Microsoft.AspNet.Identity.Core 2.1.0'.您正在从Microsoft下载Microsoft.AspNet.Identity.Core,其许可协议可从 http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm获取.检查软件包是否有其他依赖关系,这可能与他们自己的许可协议一起提供.您对软件包和依赖项的使用即表示您接受其许可协议.如果您不接受许可协议,请从设备中删除相关组件.成功安装了"Microsoft.AspNet.Identity.Core 2.1.0".将"Microsoft.AspNet.Identity.Core 2.1.0"添加到PracticeMvcApplication.卸载'Microsoft.AspNet.Identity.Core 2.1.0'.成功卸载'Microsoft.AspNet.Identity.Core 2.1.0'.安装失败.回滚...安装包:无法安装包'Microsoft.AspNet.Identity.Core 2.1.0'.您正在尝试将此软件包安装到以".NETFramework,Version = v4.0"为目标的项目中,但该软件包不包含与该框架兼容的任何程序集引用或内容文件.有关更多信息,请与软件包作者联系.
我正在测试Visual Studio 2010的新数据库项目功能,并希望更改表中列的名称.我在创建脚本中更改了名称并将其部署在数据库中.生成的脚本刚刚删除了列并添加了一个具有正确名称的新列,但所有数据都已丢失.
是否有不会丢弃列数据的设置?
我正在寻找这个问题的"DataDude"解决方案.(如果有的话)
PRINT N'Altering [dbo].[Users]...';
GO
ALTER TABLE [dbo].[Users] DROP COLUMN [TestX];
GO
ALTER TABLE [dbo].[Users]
ADD [Testn] NVARCHAR (50) NULL;
GO
Run Code Online (Sandbox Code Playgroud)
谢谢,基思
有没有办法可以针对IDE外部的已编译DLL运行UnitTest项目?基本上我们有测试程序在进入生产之前验证代码.
我不想在IDE中运行测试.我希望已编译的代码准备好转移到生产,并能够在最终副本之前对.dll运行最终测试.
是否有某种命令行实用程序可以做到这一点?只需提供两个.dll并获得某种"好的"报告.
我想创建一个内部消息系统,可以告诉我一些代码被调用的持续时间.我在考虑易用性,以使SystemMessage类实现IDisposable.
我会在SystemMessage的构造函数中设置一个时间戳,如果调用了Dispose,我可以计算出持续时间.
问题是我不希望GC对象.我希望它作为MessageCollection的一部分留在身边.
在C#中是否有另一个构造可以在没有踩到IDisposable的预期功能的情况下为我提供Using语句的可用性.
Using (message = Collection.CreateNewMessage("FileDownlading"))
{
// I wonder how long it is taking me to download this file in production?
// Lets log it in a message and store for later pondering.
WebClass.DownloadAFile("You Know This File Is Great.XML");
}
// we fell out of the using statement, message will figure out how long
// it actually took to run.
// This was clean and easy to implement, but so wrong?
Run Code Online (Sandbox Code Playgroud) 我有一个跨越多个页面的表格。标题在第二页上重复出现并与内容重叠。
我正在使用引导程序并确保在我的页面中实现了来自其他 wkhtmltopdf 重叠解决方案的 css。
thead { display: table-header-group; }
tfoot { display: table-row-group; }
tr { page-break-inside: avoid; }
table, tr, td, th, tbody, thead, tfoot, td div {
page-break-inside: avoid !important;
}
Run Code Online (Sandbox Code Playgroud) c# ×2
64-bit ×1
asp.net-mvc ×1
command-line ×1
datadude ×1
idisposable ×1
misuse ×1
mstest ×1
nuget ×1
unit-testing ×1
using ×1
validation ×1
wkhtmltopdf ×1
xml ×1
xsd ×1