visual-studio-2008

What is the .NET equivalent of java's System.getProperty(“user.dir”)?

荒凉一梦 提交于 2019-12-13 14:06:12
问题 I am trying to get the full path of a file in my unit test which is in a folder in my project. i tried using Directory.GetCurrentDirectory(); but that returns the directory which my tests are running in. I want the directory of the project (or solution) without having to hard-code it in there. Then I can append the last part of the filename. Something similar to System.getProperty("user.dir") in java 回答1: Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) will get you the path of

SQLite Interop DLL Missing Method - Windows Mobile CF

本小妞迷上赌 提交于 2019-12-13 13:50:22
问题 In my Windows Mobile project, I have added the SQLite.Interop.066.DLL , set the [ Build Action ] = [ Content ] and set the [ Copy to Output Directory ] = [ Copy if newer ]. Still, after I open my my connection, I receive the unhandled Missing Method Exception message " Can't find PInvoke DLL 'SQLite.Interop.DLL " whenever I attempt to execute the reader on the SQLiteCommand . What is wrong? 回答1: Apparently, SQLite is not being managed very well. This was a bug someone reported over a year ago

Web.config Authentication Error

£可爱£侵袭症+ 提交于 2019-12-13 13:25:45
问题 I am using SQLServer2005 and VS2008. My connection string in web.config is: add name="library" connectionString="Data source=KMT; Initial Catalog=Library;Integrated Security=SSPI" Here, KMT is my server name, Library is my database. When I run my page through VS2008 localhost, it's fine. However, when viewing through IIS it shows an error message like "login failed for user, 'KMT/ASP.NET'". My sqlserver authentication mode is windows and it's ok in web.config. What will be the solution? 回答1:

Visual Studio Intellisense not up to date for one class

ⅰ亾dé卋堺 提交于 2019-12-13 13:25:24
问题 For some reasons Intellisense is not up to date for 1 class (C++) in my project (when I call a method it refers to the old parameters and so on)! I'm able to compile but it would be fine if there is an option to update Intellesense (refresh local cache or something)? Thx 回答1: Unload the project in the solution and reload it! (now I solved this issue) 回答2: I helped myself by renaming the intellisense database file (*.ncb) to - as example - *.ncbx. This helped me for my VS2008 Problem. But

Why is “Evaluation of lambda expressions is not valid in the debugger”?

人盡茶涼 提交于 2019-12-13 12:59:38
问题 I have a seemingly innocent code snippet, which I typed into Visual Studio 2008 Immediate Window . ? results.Join(lstDocs, Function(docID) docID) Evaluation of lambda expressions is not valid in the debugger. As the message says, it's not possible to call a lambda expression in the debugger. Why is it not allowed? 回答1: Here: Why is LINQ absent from debugger windows? And this previous question: VS debugging “quick watch” tool and lambda expressions In short, complexity. 回答2: http://msdn

“Unable to connect to remote server fail” in HttpWebRequest

时光总嘲笑我的痴心妄想 提交于 2019-12-13 11:35:19
问题 I am using VSTS 2008 + C# + .Net 3.5 to develop a console application and I send request to another server (IIS 7.0 on Windows Server 2008). I find when the # of request threads are big (e.g. 2000 threads), the client will receive error "Unable to connect to remote server fail" when invoking response = (HttpWebResponse)request.GetResponse().My confusion is -- I have set timeout to be a large value, but I got such fail message within a minute. I think even if the connection are really larger

The application has failed to start because the application is incorrect

两盒软妹~` 提交于 2019-12-13 07:46:22
问题 I am getting this error while execution of my application. I am using VS 2008 version '9.0.30729.1 SP' on Windows Server 2008. Here is my manifest file description <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel> </requestedPrivileges> <

Gridview, is there an event, how would I determine that it has finished being rendered?

那年仲夏 提交于 2019-12-13 07:28:02
问题 Gridview, is there an event, how would I determine that it has finished being rendered? That's basically it, I want to adjust the height of some other controls on the page and I want to pick up this event. Sorry I should have been more explicit in stating that this is actually a web page not a winform. In the end I managed to solve the problem by registering a function with the page load which is called after the controls have been drawn and they calling the gridview size and resizing the

How to Apply Multicolumn in another Details Section C#, Crystal Reports, vs2008

◇◆丶佛笑我妖孽 提交于 2019-12-13 07:11:54
问题 I am Having a Report In here am Having 4 Details Section a,b,c,d , and I want to apply Multi column in only one Details section, that is the Section which has the Sub Report Currently. I Have used Sub report because I thought, applying multiple column to only one Details Section is not Possible.... and Got into another Burden, My Report can have more than 2500 pages, while using subreports, it is very slow while printing and / or navigating to last Page. So, only in the Section C I have to

Lost parameter names in TableAdapter generated Insert method

﹥>﹥吖頭↗ 提交于 2019-12-13 06:43:45
问题 I'm trying to generate a Insert method in a TableAdapter with a query like INSERT INTO Status (ScheduleID, StatusID, Name, Color) VALUES (?, ?, ?, ?) Here Name is a string and the other are integers. The generated signature however looks like this: InsertQuery(int Color, string Param2, string Param3, string Param4) Which does not match the query, either in name or order of parameter types. How can this happen? How can I be sure that Parameter2 is StatusID if I decide to change it manually?