Tag: visual studio

在VS2008中的Windows x64上调试x86 .NET应用程序

我使用x64版本的Windows 7.我的应用程序使用一些无法在x64上下文中加载的COM服务器(通常是本机x86 COM服务器)。 所以我决定使用WOW将其作为x86应用程序运行,因此我将平台目标设置为x86。 但是当我尝试调试它时,Visual Studio 2008调试器开始显示所有源文件的“源文件不同……”之类的消息。 这种行为的原因是什么? 这个问题诞生于那里“源文件不同……”消息在Visual Studio 2008中是在x64 Windows上调试x32应用程序的结果 更新 :我清理解决方案,重建解决方案,删除obj,bin等文件夹,重新启动计算机,重新安装Visual Studio …那么,还有什么可能是问题? Update2 :如果您创建新的Windows应用程序项目并将目标平台更改为x86,您将看到此问题。 但如果从项目中删除Settings1.settings,麻烦将被消除! 。 任何的想法? Update3 : http : //social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/bc297668-65b4-46e8-969e-c7a6340d33b6

如何从Visual Studio手动终止特定(正在运行)的线程

出于测试目的,我需要从Visual Studio 手动终止命名线程(在调试会话中) – 或者允许我这样做的任何其他工具? 但Visual Studio 2010中的Threads调试窗口在线程的上下文菜单中只有一个Freeze选项,而Sysinternal的ProcessExplorer只列出进程,而不是线程。 有没有办法手动杀死特定(正在运行)的线程?

nhibernate无法使用LeftOuterJoin解析属性(仅在Visual Studio 2015中)

我需要一些帮助,因为无法解释这一点。 我们有一个半复杂的nhibernate查询: var query = _tyreRepository.Session.QueryOver(() => tyreAlias) .JoinQueryOver(() => tyreAlias.Pattern, () => patternAlias) .JoinQueryOver(() => patternAlias.Brand, () => brandAlias) .JoinQueryOver(() => tyreAlias.RimSize, () => rimSizeAlias) .JoinQueryOver(() => tyreAlias.SpeedIndex, () => speedIndexAlias, JoinType.LeftOuterJoin); 哪个在Visual Studio 2012中工作正常,我们最近升级到Visual 2015,现在这个查询不起作用; 当你在速度指数上使用where时: query.Where(() => speedIndexAlias.SpeedKm >= speedKms); 否则查询工作正常。 花了很长时间调试回滚代码没什么用。 然后我们得到了相同的项目,在visual studio 2012中正常工作。 我们无法弄清楚为什么当我们在visual studio 2015中编译项目时,这个查询不再有效(对查询没有任何改变)。 我非常喜欢2015年的所有新语言变化,但是当我们在Visual Studio 2015中编译代码时,我们的网站中断…

无法在Visual Studio 2017 RC中启动IIS Express

有一个Web应用程序完美地在Visual Studio 2015 Update 3中工作。 我将项目移植到Visual Studio 2017 RC并成功编译。 在调试应用程序时,IIS Express在VS 2017 RC的输出窗格中转储下面的消息后终止: The program ‘[7896] iisexpress.exe: Program Trace’ has exited with code 0 (0x0). The program ‘[8488] dotnet.exe’ has exited with code 0 (0x0). The program ‘[8488] dotnet.exe: Program Trace’ has exited with code 0 (0x0). The program ‘[7896] iisexpress.exe’ has exited with code […]

Visual Studio大型解决方案

我有一个解决方案,我的webapplication有近12个项目和3个网站。 我有一些项目用于多个网站,如MyProject.BE / MyProject.BLL / MyProject.DAL / MyProject.Controls项目。 我的问题是,为BE / BLL / DAL /控件创建多个项目是否合适?是否更好地为BE / BLL / DAL层创建包含文件夹的1个项目?

如何告诉Visual Studio不填充设计器代码中的字段?

我有一个自定义控件,当我拖到窗体上时,创建以下designer.cs代码: // // colorPickerBackground // this.colorPickerBackground.Color = Color.Empty; this.colorPickerBackground.Location = new System.Drawing.Point(256, 175); this.colorPickerBackground.Name = “colorPickerBackground”; this.colorPickerBackground.Size = new System.Drawing.Size(156, 21); this.colorPickerBackground.TabIndex = 17; this.colorPickerBackground.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.colorPicke 我希望它(Visual Studio)完全忽略.Color属性并保留它。 我怎么能告诉它这样做? 谢谢!

Windows窗体调整框架,没有标题栏?

如何从Windows窗体隐藏标题栏但仍具有resize框?

Visual Studio null引用警告 – 为什么没有错误?

我注意到了Visual Studio特有的一些东西。 首先,尝试在函数中的某处键入此(C#): class Foo { public void Bar() { string s; int i = s.Length; } } 现在,它会立即将s.Length的s标记为错误,并说“ Use of unassigned local variable ‘s’ ”。 另一方面,请尝试以下代码: class Foo { private string s; public void Bar() { int i = s.Length; } } 它将编译,并在带有警告的private string s为s加下划线,称“ Field ‘Foo.s’ is never assigned to, and will always […]

如何为通用Windows应用程序设置固定窗口大小

我刚刚开始在VS2015社区版中开发通用Windows应用程序。 我使用了名为PieCharts for Windows UWP的示例。 我的问题是,我想将窗口大小修改为400×650,就像我在旧桌面应用程序中所做的那样。 我手动设置宽度和高度它不起作用。 我的MainPage.xaml类似于以下代码。 窗口大小错误,我可以调整窗口大小。 谢谢,

在Visual Studio中调试x64 Azurefunction

我正在通过Visual Studio编写C#Azure函数。 此function通过博客存储触发,并使用x64 C ++ DLL处理blob。 问题是与visual studio一起安装的默认Azurefunction工具只有x86版本的exe函数(func.exe)。 我在这个URL看到,现在有x64版本: https : //github.com/Azure/azure-functions-core-tools/releases 问题是,默认情况下,Visual Studio正在我的机器上选择1.2.0版本的工具(C:\ Users \ acardy \ AppData \ Local \ AzureFunctionsTools \ Releases \ 1.2.0),我没有看到1.2 .0 x64在URL上发布。 有没有办法让Visual Studio选择一个我可以用x64版本修补的不同版本? 我目前正在运行Visual Studio 15.7.1版。 谢谢。