visual-studio-2008

Multithread a unit test

穿精又带淫゛_ 提交于 2020-01-05 19:59:33
问题 In order to test concurrency issues, I want to call the same method on two different threads at exactly the same time using a unit test. In fact I probably want to call the same method on several threads at the same time. I'm using Microsoft's built in unit tester for VS2008. My thoughts are that I would lock an object and then synchronously setup each of the threads which would immediately wait on the lock and then release the lock which would allow all threads to access the shared resources

MSBuild, Extension Pack and TfsVersion

冷暖自知 提交于 2020-01-05 14:11:32
问题 I am trying to implement what I see in this post: TFS and msbuild version number with last changeset. That is, I am trying to get the last Changeset number at build time so I can use it in an AssemblyVersionInfo.cs. I am using VS 2008 and TFS 2008. I have installed MSBuild Extension pack v3.5.9.0 (x64). It is in C:\Program Files\MSBuild\ExtensionPack. Here is my MSBuild project: <Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

MSBuild, Extension Pack and TfsVersion

穿精又带淫゛_ 提交于 2020-01-05 14:11:28
问题 I am trying to implement what I see in this post: TFS and msbuild version number with last changeset. That is, I am trying to get the last Changeset number at build time so I can use it in an AssemblyVersionInfo.cs. I am using VS 2008 and TFS 2008. I have installed MSBuild Extension pack v3.5.9.0 (x64). It is in C:\Program Files\MSBuild\ExtensionPack. Here is my MSBuild project: <Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

Redirection between two websites within one solution (ASP.NET + VS 2008 + IIS 5.1)

六月ゝ 毕业季﹏ 提交于 2020-01-05 13:55:16
问题 I have an issue with redirecting from one asp website to another within one VS solution. I have set up virtual directories as follows: C:\WebSites\Website1 - /Website1 C:\WebSites\Website2 - /Website2 My starting website is Website1. I want to redirect user to Website2. I use Response.Redirect("/Website2/Default.aspx") and get 404 error. What am I doing wrong? Any advices are highly appreciated! Thank you in advance. 回答1: Lets say the current page is http://localhost/Website1/Default.aspx, if

Python install package getting error with msvccompiler

谁说胖子不能爱 提交于 2020-01-05 13:54:27
问题 I have already install python(x,y)2.7.6.1 in Windows7 64bit and try to install a package "imreg" (from here) python setup.py install I am getting this error: no module named msvccompiler in numpy.distutils trying from distutils customize msvccompiler I have installed visual studio 2008 and Microsoft Visual C++ Compiler for Python 2.7(from here) but I don't know how to solve this problem 回答1: I solved this question by this way: MinGW with C++ Compiler installed. in " C:\Python27\Lib\distutils"

Visual Studio keeps adding blank lines

亡梦爱人 提交于 2020-01-05 12:03:34
问题 I'm using Visual Studio 2008 for an ASP .Net application, and Visual Studio keeps adding blank lines to my aspx file whenever I save, switch to design mode and back to code view, switch to split mode, or switch between files. Before I save, I will have: </ContentTemplate></asp:UpdatePanel> </ContentTemplate> </ajax:TabPanel> </ajax:TabContainer> Then, it will magically transform into: </ContentTemplate></asp:UpdatePanel> </ContentTemplate> </ajax:TabPanel> </ajax:TabContainer> I know it's

Visual Studio keeps adding blank lines

不羁岁月 提交于 2020-01-05 12:02:51
问题 I'm using Visual Studio 2008 for an ASP .Net application, and Visual Studio keeps adding blank lines to my aspx file whenever I save, switch to design mode and back to code view, switch to split mode, or switch between files. Before I save, I will have: </ContentTemplate></asp:UpdatePanel> </ContentTemplate> </ajax:TabPanel> </ajax:TabContainer> Then, it will magically transform into: </ContentTemplate></asp:UpdatePanel> </ContentTemplate> </ajax:TabPanel> </ajax:TabContainer> I know it's

Execution output to text file

﹥>﹥吖頭↗ 提交于 2020-01-05 09:34:20
问题 I am writing a C program using Visual Studio 2008. I use F7 to compile and F5 to execute the program.When I press F5 an execution window contains the output. But I want the output to get saved to a text file. How to do this in visual studio. Please help me someone. 回答1: I think using the command line parameter > output path will do the trick. for example: myapp.exe >D:\result.txt will direct the app output to result.txt file. If you running the application from within Visual Studio, you can

x86 TargetPlatform with XBAPs

╄→гoц情女王★ 提交于 2020-01-05 08:32:44
问题 I've got a XAML Browser Hosted Application (XBAP) project that has a dependency on another project that is x86 only. All sorts of hell breaks loose at runtime (with respect to grabbing the DLLs) if I leave the target platform as "Any CPU". However, if I switch the XBAP project to target x86, I get the following compile time error: Error 7 - Cannot build a platform-specific XAML Browser Application. If HostInBrowser property is set to 'True', either do not set the PlatformTarget property or

Gridview Error :A call to Bind was not well formatted

孤街浪徒 提交于 2020-01-05 08:28:10
问题 I have following code for gridview : <asp:TemplateField HeaderText="N/A"> <ItemTemplate> <asp:Label ID="lblENGNA" runat="server" Text='<%# Bind("N/A") %>'> </asp:Label> </ItemTemplate> </asp:TemplateField> When i run this its giving me error for above section that: Parser Error Message: A call to Bind was not well formatted. Please refer to documentation for the correct parameters to Bind. Error Image: Note: my query(which binds grid) contains field N/A 回答1: I added [N/A] in bind and it