visual-studio-2010

ATL COM class registration .rgs file defaults

落花浮王杯 提交于 2020-01-02 03:11:01
问题 I'm creating a COM server executable, and have run into a problem with class registration. When I created my class object, the automatically generated .rgs file looked like this: HKCR { NoRemove CLSID { ForceRemove {4C6DAD45-64B4-4C55-81C6-4CE125226421} = s 'Test Class' { ForceRemove Programmable LocalServer32 = s '%MODULE%' { val ServerExecutable = s '%MODULE_RAW%' } TypeLib = s '{EAA173CA-BDBC-463A-8B7A-B010EFA467BC}' Version = s '1.0' } } } This created the registry entries correctly for

NullReferenceException in creating Excel worksheet

╄→尐↘猪︶ㄣ 提交于 2020-01-02 02:40:06
问题 i want to fill an excel file and so i use ExcelPackage: Office Open XML Format . but i have an error. my code: string fileName = "DBE_BAKIM_FORMU" + ".xlsx"; FileInfo fi = new FileInfo(HttpContext.Current.Server.MapPath("~/") + fileName); using (ExcelPackage xlPackage = new ExcelPackage(fi)) { ExcelWorksheet worksheet = xlPackage.Workbook.Worksheets[1]; dbeDataContext db = new dbeDataContext(); CAGRI c = (from x in db.CAGRIs where x.CagriID == ID select x).SingleOrDefault(); USER u = (from x

Convert MVC 2 ASPX into MVC 4 Razor view engine

蹲街弑〆低调 提交于 2020-01-02 02:22:25
问题 I am currently working on MVC 2 with visual studio 2010 and view engine as ASPX kind of project. So I have decided to move with Visual studio 2012 with MVC 4 and view engine as Razor . So could I achieve above task.If so How ? I would like to hear your experience for similar kind of situation. Note : My project is a large one. 回答1: Create a new MVC4 project in Visual Studio 2012 and add source files from your old solution to your new solution one at a time. Moving from MVC3 to MVC4 is easier

Visual Studio 2010 Pro - SuppressMessage

雨燕双飞 提交于 2020-01-02 01:56:28
问题 Is the option to SupressMessage not available in VS 2010 Pro? When I right click on the warning in the warning list there is no option to suppress. I also tried it with errors and there was no option. I then tried to create my own GlobalSuppression.cs file but have no idea what category the warning should be classified under. Right now I'm doing this, which works, but I would prefer to use a GlobalSuppression file #pragma warning disable 0649,0169 [Import(AllowRecomposition = false)] private

<Not Available> and [Thread Destroyed] details in Thread window for Visual Studio 2010

半世苍凉 提交于 2020-01-02 01:35:13
问题 I've been trying to debug some issues related with threads with one application. When I attach to the application I see a window like this one: What is this thread with a name "[Thread Destroyed]"? The app code is not writing this name for sure. What means that a Thread has the call stack not available. The "Acquisition Engine" thread is created inside the application and runs inside a loop until stopped. If the thread is stopped it exits the loop and it ends its life so it should be in the

Visual Studio find and replace right square bracket ] in character class

匆匆过客 提交于 2020-01-02 01:20:10
问题 I want to make a negated character class to match a square bracket tag like this [square bracket tag] . The problem is, the ] character ends the character class! I tried \[[^\]]+] but I get a syntax error when I run it. (This is in the find and replace regex engine which is slightly different than the standard .NET engine fyi). 回答1: You forgot to escape the final end bracket: \[[^\]]+\] 回答2: The first example in msdn uses \\ for escaping the \ which then escapes the . . So you should do

Visual Studio Deployment Package - change the file structure the .zip creates?

。_饼干妹妹 提交于 2020-01-02 01:06:08
问题 Everything works as expected but I would like to improve the directory structure that the .zip produces. When I create a deployment package I have it create in a custom directory which works fine but the .zip it creates is in the structure of: content/c_c/users/pcName/documents/VS2010/Projects/ProjectName/obj/release/package/packageTmp Only in the packageTmp directory do I get to the files I want! Is there a way for the created zip to not include all of those empty directories? 回答1: I never

Perforce troubles “file not under client's root” error message

孤街醉人 提交于 2020-01-02 01:03:12
问题 I am adding a project to perforce via VS2010 but I keep getting this error 'file' not under client's root for all the files in the project. I can't seem to figure this out. Here is what I am doing: 1) Open VS2010 project which is not in perforce yet. 2) I select add the solotion to perforce (from File > Source Control > Add Solution menu). 3) I select a new workspace. It brings up the properties of the workspace. The root folder is default to c:\Users\My.Name. I change this to the folder

Visual 2010 keeps telling me “error: Expression must have class type”

假装没事ソ 提交于 2020-01-02 00:59:13
问题 Okay I need some insight. I am taking a C++ class and am working on my second project. I am trying to create a list of options that allow you to store emails in a string vector. Now before taking the time to help me and look at the code I want to point out my problem. I made an object in the file "HughesProject2-1.cpp": HughesEmail myhughesEmail(); Well the problem comes right after this when I used this object to run displayList(): myHughesEmail.displayList(); Visual 2010 keeps telling me

Can I use Entity Framework 6 with Visual Studio 2010?

隐身守侯 提交于 2020-01-02 00:57:15
问题 Our development team (and build servers) successfully use a mixture of Visual Studio 2010 and Visual Studio 2012 for our application. However, since upgrading from EF5 to EF6, we no longer seem to be able to build with VS2010. Specifically, the build machines won't build at all. VS2010 on my desktop does seem to build, but I get the following errors: Error 4 Error 10023: Could not find the conceptual model to validate. Error 5 Error 10024: Could not find the storage model to validate. Error 6