Search Results

Search found 46 results on 2 pages for 'netframework'.

Page 1/2 | 1 2  | Next Page >

  • .Net framework 1.1 web application on Safari

    - by Vijay
    We have an intranet web application developed using .NET framework 1.1 The application has few validators and fired from the server side (They are not client side validators). The web application runs perfectly fine on IE and Firefox (both on Mac and Windows). However on Safari(ver 4.0.3) browser running on Mac, the application intermittently fails to do post-back while submitting the page and just reloads the page. Is this issue something to do with .Net framework 1.1 or Safari browser? Is there any way to resolve this issue? Any pointers on this would be very helpful. Thanks!

    Read the article

  • Visual Studio Express 2012 debug mode doesn't work

    - by user2350086
    I have a project in Visual Studio that I have been working on for a while, and I have used the debugger extensively. Recently I changed some settings and I have lost the ability to stop the program and step through code. I can't figure out what I had changed that might have affected this. If I put a breakpoint in my code and try to have the program stop there, it doesn't. The break point shows up white with a red outline. If I hover the mouse over it, it says "The breakpoint will not currently be hit. No executable code of the debugger's target code type is associated with this line. Possible causes include: conditional compilation, compiler optimizations, or the target architecture of this line is not supported by the current debugger code type." I know for a fact that the program executes the code where the breakpoint is because I put the breakpoint in the beginning of the InitializeComponent method. The program displays the window fine, but does not stop at the breakpoint. Yes, I am running in debug mode. It seems as though there is a disconnect between the compiled code and the source code displayed. Does anyone know what that would be, or know which compiler settings I should check to re-enable debugging? Here are the compiler options: /GS /analyze- /W3 /Zc:wchar_t /I"D:\dev\libcurl-7.19.3-win32-ssl-msvc\include" /Zi /Od /sdl /Fd"Debug\vc110.pdb" /fp:precise /D "WIN32" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Oy- /clr /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\mscorlib.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Data.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Drawing.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Windows.Forms.DataVisualization.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Windows.Forms.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xml.dll" /MDd /Fa"Debug\" /EHa /nologo /Fo"Debug\" /Fp"Debug\Prog.pch" The linker options are: /OUT:"D:\dev\Prog\Debug\Prog.exe" /MANIFEST /NXCOMPAT /PDB:"D:\dev\Prog\Debug\Prog.pdb" /DYNAMICBASE "curllib.lib" "winmm.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /FIXED:NO /DEBUG /MACHINE:X86 /ENTRY:"Main" /INCREMENTAL /PGD:"D:\dev\Prog\Debug\Prog.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Debug\Prog.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"D:\dev\libcurl-7.19.3-win32-ssl-msvc\lib\Debug" /ASSEMBLYDEBUG /TLBID:1

    Read the article

  • MSBuild cannot find SGen when compiling a solution

    - by Jaxidian
    I've looked at several other SGen-related questions on here and either their answers don't apply or their answers don't fix this for me. I have installed several SDKs to fix this issue with no luck. Reference types should not be changed since this is the only place this is a problem. Once suggestion is to put SGen.exe into the C:\Windows\Microsoft.NET\Framework\v3.5 folder, but that's not been done on the box where this is not a problem. In this scenario, SGen.exe actually exists and is right where it's supposed to be, but MSBuild still is having issues with finding it for some reason! Background: We have a NAnt script that automates our builds. In this scenario, NAnt is calling MSBuild and MSBuild is generating the error claiming to be unable to find SGen. The project is .NET 3.5-based. I have my primary dev environment (64-bit Vista Ultimate) where the script works perfectly and I am attempting to duplicate it in a VM (64-bit Win 7 Ultimate). I THINK I have everything to the point where I should be good-to-go but this fails on the Win7 box (works perfectly on the Vista box). I have done some comparisons between the two boxes and they both look identical in this regard, but it still fails. For example, the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework's sdkInstallRootv2.0 value is set to C:\Program Files\Microsoft.NET\SDK\v2.0 64bit\ on both machines. In both machines, SGen.exe is in that path's bin subdirectory. NAnt Script: <target name="report-installer" depends="fail-if-environment-not-set"> <exec program="MSBuild.exe" basedir="${framework35.directory}"> <arg value="${tools.directory.current}\ReportInstaller\ReportInstaller.sln" /> <arg value="/p:Configuration=${buildconfiguration.current}" /> </exec> </target> The error message I get is this: report-installer: [exec] Microsoft (R) Build Engine Version 3.5.30729.4926 [exec] [Microsoft .NET Framework, Version 2.0.50727.4927] [exec] Copyright (C) Microsoft Corporation 2007. All rights reserved. [exec] [exec] Build started 4/8/2010 11:28:23 AM. [exec] Project "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.sln" on node 0 (default targets). [exec] Building solution configuration "Release|Any CPU". [exec] Project "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.sln" (1) is building "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.csproj" (2) on node 0 (default targets). [exec] Could not locate the .NET Framework SDK. The task is looking for the path to the .NET Framework SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK. 2.) Manually set the above registry key to the correct location. [exec] CoreCompile: [exec] Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files. [exec] C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1902,9): error MSB3091: Task failed because "sgen.exe" was not found, or the .NET Framework SDK v2.0 is not installed. The task is looking for "sgen.exe" in the "bin" subdirectory beneath the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK v2.0. 2.) Manually set the above registry key to the correct location. 3.) Pass the correct location into the "ToolPath" parameter of the task. [exec] Done Building Project "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.csproj" (default targets) -- FAILED. [exec] Done Building Project "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.sln" (default targets) -- FAILED. [exec] [exec] Build FAILED. [exec] [exec] "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.sln" (default target) (1) -> [exec] "C:\Projects\Production\Tools\ReportInstaller\ReportInstaller.csproj" (default target) (2) -> [exec] (GenerateSerializationAssemblies target) -> [exec] C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1902,9): error MSB3091: Task failed because "sgen.exe" was not found, or the .NET Framework SDK v2.0 is not installed. The task is looking for "sgen.exe" in the "bin" subdirectory beneath the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK v2.0. 2.) Manually set the above registry key to the correct location. 3.) Pass the correct location into the "ToolPath" parameter of the task. [exec] [exec] 0 Warning(s) [exec] 1 Error(s) [exec] [exec] Time Elapsed 00:00:00.24 [call] C:\Projects\Production\Source\reports.build(15,4): [call] External Program Failed: C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe (return code was 1) What am I doing wrong here that is causing MSBuild to STILL be unable to find SGen?

    Read the article

  • Visual Studio reference x64 GAC

    - by icelava
    How can one get Visual Studio 2005/2008 to reference assemblies in the 64-bit GAC instead of the 32-bit GAC? We are settin the target platfom to x64 and the compiler is throwing the error of Error 2 Warning as Error: Assembly generation -- Referenced assembly 'System.Data.dll' targets a different processor Common Error 3 Warning as Error: Assembly generation -- Referenced assembly 'mscorlib.dll' targets a different processor Common Error 4 Assembly signing failed; output may not be signed -- The system cannot find the file specified. Common Update 29 Dec 08 Been trying out Aaron Stebner's suggestions to place 64-bit assemblies onto an isolated location (e.g. C:\Windows\Microsoft.NET\Framework64\v2.0.50727\GAC_64) and creating additional entries in the registry like HKLM\SOFTWARE\Microsoft.NETFramework\AssemblyFolders\GAC_64 or HKLM\SOFTWARE\Microsoft.NETFramework\v2.0.50727\AssemblyFoldersEx\GAC_64 but Visual Studio 2005 is still not picking it up....

    Read the article

  • installing WWF into VS 2008 Express

    - by zerkms
    Hello guys. I'm trying to install WWF with VS2008E. Thats what I already did: Go to http://msdn.microsoft.com/en-us/netframework/aa663328.aspx "Get it" http://msdn.microsoft.com/en-us/netframework/dd980558.aspx "Get the Windows Software Development Kit" http://msdn.microsoft.com/en-us/windows/bb980924.aspx Select first link at Downloads (due to I'm using windows 7) "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1" http://go.microsoft.com/fwlink/?LinkID=150217&clcid=0x409 Download dvd iso and install it So SDK installed successfully, but I can't find new project type at VS and WWF examples provided with SDK doesn't opened, because they references to not exists WWF. So where i was wrong and how to do what i need? Thank you.

    Read the article

  • Telephone.com

    - by jrice
    Check Telephone.com our new website using .netframework 3.5 You can now add your own twist to telephone.com and personalize your messaging style by writing your own SMS applications to implement any feature you would like to add to your messaging experience using our wcf rest API Regards

    Read the article

  • Excluding executables in winsxs folder

    - by Yasser Sobhdel
    I am facing a big problem since there are many msbuild.exe files in .Netframework and winsxs folders and I don't know if it is required to set all of them as trusted in the antivirus. The path changes server to server and hence it makes life harder! If it matters to you, I am using Kaspersky endpoint security 10. When defining trusted application, as far as I know, you must point exactly to the executable with hard-coded path. Thanks

    Read the article

  • .NET Framework 4.0 mysteriously loses track of System.EnterpriseServices

    - by Lorin Thwaits
    The GAC in .NET 4.0 is cut into two parts now -- one half for .NET Framework 2.0 stuff, and the other for v4.0 stuff. When compiling any project, targeting .NET 2.0, 3.5, or what have you, this annoying error may pop up: Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. In that case, open a run box and perform this copy command: xcopy %ProgramFiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.EnterpriseServices.dll %windir%\Microsoft.NET\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a /e This reconstructs the proper portion of the GAC for that one missing file.

    Read the article

  • How to create a setup for a web application with Web Platform Installer

    - by Nasser Hajloo
    I have a large Web Application ( ErPwith 11 subsystem) and I want tocreate a setup for itwith Microsoft WebPI. Currently We send our application for customers once a week (for weekly updates). We usefollowing tools in this application, So How to create a setup for out project toconfigure it in client IIS automatically List item .netFramework 3.5 SQL server 2008 Asp.net C# NHibernate Log4net castleProxy SQL Server Reporting Services (RDL) Visual Studio Client Reports (RDLC) Javascript JQuery

    Read the article

  • Winforms DataBind to Control's Visible Property

    - by B Z
    WinForms, .NetFramework 3.5 Are there any known issues when databinding to a control's visible property? The control is always NOT visible regardless of what my property is. Public ReadOnly Property IsRibbonCategory() As Boolean Get Return True End Get End Property I tried the control's text property and other properties and they seem to work correctly. I am trying to set a Panel's visible property. Using a BindingSource. Thx in advance.

    Read the article

  • How can I progrommatically change the target framework from 4.0 to 3.5 of a project/solution?

    - by scott
    Edit 3: After more googling it looks like you can't have the TargetFrameworkMoniker property in a .NET 3.5 application. So I guess I should be asking a different question. How do I change the Target framework from 4.0 to 3.5? Unfortunately, I can only find stuff on how to go the other way. or better yet how do i progrommatically set the target framework version of a project to something other than 4.0? Original question: I just switched to vs2010. I have an application that uses .net 3.5. It loads plugins which are generated by a different app. The plugins are using .net 4 and there for cannot be loaded. I'm using EnvDTE.Project to create a project and set the settings. I can't find what setting needs to be set for this. Edit 1: I'm generating code for about 50 solutions. When I made the switch from vs2005 to vs2010 the projects in those solutions are defaulting to .NET Framework 4.0. So I need to set the .NET Framework to 3.5 when I am generating the code for these solutions. Edit 2: After a lot of googling I found this. so then I tried this: loProp = vsGetProperty("TargetFrameworkMoniker"); vsSetValue(loProp, ".NETFramework,Version=v3.5"); the definitions for those two methods are below. as far as I can tell they do the same this as project.Properties.Item("TargetFrameworkMoniker").Value = ".NETFramework,Version=v4.0,Profile=Client"; I start getting an Property Unavailable Exception later in the code. When I remove the new lines everything works except the projects target framework is still 4.0. The code generators target framework is 3.5 so I can't use the FrameworkName class like shown in the second example in that link. here is vsGetProperty protected Property vsGetProperty(string aProperty) { bool lbDone = false; int liCount = 0; Property loProp; while (!lbDone && liCount < pMaxRetries) { try { loProp = pProject.Properties.Item(aProperty); lbDone = true; return loProp; } catch (System.Runtime.InteropServices.COMException loE) { liCount++; if ((uint)loE.ErrorCode == 0x80010001) { // RPC_E_CALL_REJECTED - sleep half sec then try again System.Threading.Thread.Sleep(pDelayBetweenRetry); } } } return null; } and vsSetValue protected void vsSetValue(Property aProperty, string aValue) { bool lbDone = false; int liCount = 0; while (!lbDone && liCount < pMaxRetries) { try { aProperty.Value = aValue; lbDone = true; } catch (System.Runtime.InteropServices.COMException loE) { liCount++; if ((uint)loE.ErrorCode == 0x80010001) { // RPC_E_CALL_REJECTED - sleep half sec then try again System.Threading.Thread.Sleep(pDelayBetweenRetry); } } } }

    Read the article

  • Disabling at application level a nic (network interface) on Windows

    - by Leandro
    How can I disable at application level a network interface? The main question is this: If I disable the nic trough wmic (win7) or devcon (XP), the "plug and play" of a wired nic doesn't work any more. For example, if the user put the cable on a disabled nic, the OS doesn't know about it. So I need to persist the enable condition but disabling the networking like a disable nic. There's some API, network configuration (routing, changing ip, changing gateway, any), .NET Framework resource (Only NetFramework 2.0) or do you can think in any workaround to do this? Suggest and ideas also will be treated as a solution. Thanks and kind regards.

    Read the article

  • Nice take on Open Source

    - by EmbeddedInsider
    I just revisited the “Micro Framework”- Microsoft’s bootable runtime, essentially an OS that allows managed code to run on small 32bit CPUs, even without Memory Management.  Things are happening http://msdn.microsoft.com/en-us/netframework/bb267253.aspx Abstract The Microsoft .NET Micro Framework is a bootable runtime module that brings the advantages of .NET programming to devices too resource-constrained to run other Microsoft embedded platforms. The benefits of developing with the .NET Micro Framework include the C# programming language, a managed execution environment, a substantial subset of the .NET libraries, and Visual Studio™ deployment and debugging. In this white paper we explain why the .NET Micro Framework is an ideal choice for embedded development and provide technical details of the platform’s Hardware Abstraction Layer (HAL) and Common Language Runtime (CLR). “Micro Framework” is an interesting product, it is very low cost, like zero. And it is largely community controlled under the Apache License.  A partner network is building, and the application environment is .NET. I have been following this for some time, and the community open source approach seems to be working.  There are new features/packages emerging, for example an F# programming language (ARGH! I am still wresting with VB and C#). Anyway, what I found most interesting was a port to Tron.  Tron is a very popular Japanese open source intuitive.  It is a very real time, very compact kernel, and is, like the Micro Framework, ‘free as beer’.  One limit on MF was it was not real time.  But the merger with Tron may eliminate that problem.  Certainly, if I were dealing with a consumer product with quantities in the millions (like a SmartGrid device, or a toy) I would seriously consider something out of this technology pool.

    Read the article

  • Adding and accessing custom sections in your C# App.config

    - by deadlydog
    So I recently thought I’d try using the app.config file to specify some data for my application (such as URLs) rather than hard-coding it into my app, which would require a recompile and redeploy of my app if one of our URLs changed.  By using the app.config it allows a user to just open up the .config file that sits beside their .exe file and edit the URLs right there and then re-run the app; no recompiling, no redeployment necessary. I spent a good few hours fighting with the app.config and looking at examples on Google before I was able to get things to work properly.  Most of the examples I found showed you how to pull a value from the app.config if you knew the specific key of the element you wanted to retrieve, but it took me a while to find a way to simply loop through all elements in a section, so I thought I would share my solutions here.   Simple and Easy The easiest way to use the app.config is to use the built-in types, such as NameValueSectionHandler.  For example, if we just wanted to add a list of database server urls to use in my app, we could do this in the app.config file like so: 1: <?xml version="1.0" encoding="utf-8" ?> 2: <configuration> 3: <configSections> 4: <section name="ConnectionManagerDatabaseServers" type="System.Configuration.NameValueSectionHandler" /> 5: </configSections> 6: <startup> 7: <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> 8: </startup> 9: <ConnectionManagerDatabaseServers> 10: <add key="localhost" value="localhost" /> 11: <add key="Dev" value="Dev.MyDomain.local" /> 12: <add key="Test" value="Test.MyDomain.local" /> 13: <add key="Live" value="Prod.MyDomain.com" /> 14: </ConnectionManagerDatabaseServers> 15: </configuration>   And then you can access these values in code like so: 1: string devUrl = string.Empty; 2: var connectionManagerDatabaseServers = ConfigurationManager.GetSection("ConnectionManagerDatabaseServers") as NameValueCollection; 3: if (connectionManagerDatabaseServers != null) 4: { 5: devUrl = connectionManagerDatabaseServers["Dev"].ToString(); 6: }   Sometimes though you don’t know what the keys are going to be and you just want to grab all of the values in that ConnectionManagerDatabaseServers section.  In that case you can get them all like this: 1: // Grab the Environments listed in the App.config and add them to our list. 2: var connectionManagerDatabaseServers = ConfigurationManager.GetSection("ConnectionManagerDatabaseServers") as NameValueCollection; 3: if (connectionManagerDatabaseServers != null) 4: { 5: foreach (var serverKey in connectionManagerDatabaseServers.AllKeys) 6: { 7: string serverValue = connectionManagerDatabaseServers.GetValues(serverKey).FirstOrDefault(); 8: AddDatabaseServer(serverValue); 9: } 10: }   And here we just assume that the AddDatabaseServer() function adds the given string to some list of strings.  So this works great, but what about when we want to bring in more values than just a single string (or technically you could use this to bring in 2 strings, where the “key” could be the other string you want to store; for example, we could have stored the value of the Key as the user-friendly name of the url).   More Advanced (and more complicated) So if you want to bring in more information than a string or two per object in the section, then you can no longer simply use the built-in System.Configuration.NameValueSectionHandler type provided for us.  Instead you have to build your own types.  Here let’s assume that we again want to configure a set of addresses (i.e. urls), but we want to specify some extra info with them, such as the user-friendly name, if they require SSL or not, and a list of security groups that are allowed to save changes made to these endpoints. So let’s start by looking at the app.config: 1: <?xml version="1.0" encoding="utf-8" ?> 2: <configuration> 3: <configSections> 4: <section name="ConnectionManagerDataSection" type="ConnectionManagerUpdater.Data.Configuration.ConnectionManagerDataSection, ConnectionManagerUpdater" /> 5: </configSections> 6: <startup> 7: <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> 8: </startup> 9: <ConnectionManagerDataSection> 10: <ConnectionManagerEndpoints> 11: <add name="Development" address="Dev.MyDomain.local" useSSL="false" /> 12: <add name="Test" address="Test.MyDomain.local" useSSL="true" /> 13: <add name="Live" address="Prod.MyDomain.com" useSSL="true" securityGroupsAllowedToSaveChanges="ConnectionManagerUsers" /> 14: </ConnectionManagerEndpoints> 15: </ConnectionManagerDataSection> 16: </configuration>   The first thing to notice here is that my section is now using the type “ConnectionManagerUpdater.Data.Configuration.ConnectionManagerDataSection” (the fully qualified path to my new class I created) “, ConnectionManagerUpdater” (the name of the assembly my new class is in).  Next, you will also notice an extra layer down in the <ConnectionManagerDataSection> which is the <ConnectionManagerEndpoints> element.  This is a new collection class that I created to hold each of the Endpoint entries that are defined.  Let’s look at that code now: 1: using System; 2: using System.Collections.Generic; 3: using System.Configuration; 4: using System.Linq; 5: using System.Text; 6: using System.Threading.Tasks; 7:  8: namespace ConnectionManagerUpdater.Data.Configuration 9: { 10: public class ConnectionManagerDataSection : ConfigurationSection 11: { 12: /// <summary> 13: /// The name of this section in the app.config. 14: /// </summary> 15: public const string SectionName = "ConnectionManagerDataSection"; 16: 17: private const string EndpointCollectionName = "ConnectionManagerEndpoints"; 18:  19: [ConfigurationProperty(EndpointCollectionName)] 20: [ConfigurationCollection(typeof(ConnectionManagerEndpointsCollection), AddItemName = "add")] 21: public ConnectionManagerEndpointsCollection ConnectionManagerEndpoints { get { return (ConnectionManagerEndpointsCollection)base[EndpointCollectionName]; } } 22: } 23:  24: public class ConnectionManagerEndpointsCollection : ConfigurationElementCollection 25: { 26: protected override ConfigurationElement CreateNewElement() 27: { 28: return new ConnectionManagerEndpointElement(); 29: } 30: 31: protected override object GetElementKey(ConfigurationElement element) 32: { 33: return ((ConnectionManagerEndpointElement)element).Name; 34: } 35: } 36: 37: public class ConnectionManagerEndpointElement : ConfigurationElement 38: { 39: [ConfigurationProperty("name", IsRequired = true)] 40: public string Name 41: { 42: get { return (string)this["name"]; } 43: set { this["name"] = value; } 44: } 45: 46: [ConfigurationProperty("address", IsRequired = true)] 47: public string Address 48: { 49: get { return (string)this["address"]; } 50: set { this["address"] = value; } 51: } 52: 53: [ConfigurationProperty("useSSL", IsRequired = false, DefaultValue = false)] 54: public bool UseSSL 55: { 56: get { return (bool)this["useSSL"]; } 57: set { this["useSSL"] = value; } 58: } 59: 60: [ConfigurationProperty("securityGroupsAllowedToSaveChanges", IsRequired = false)] 61: public string SecurityGroupsAllowedToSaveChanges 62: { 63: get { return (string)this["securityGroupsAllowedToSaveChanges"]; } 64: set { this["securityGroupsAllowedToSaveChanges"] = value; } 65: } 66: } 67: }   So here the first class we declare is the one that appears in the <configSections> element of the app.config.  It is ConnectionManagerDataSection and it inherits from the necessary System.Configuration.ConfigurationSection class.  This class just has one property (other than the expected section name), that basically just says I have a Collection property, which is actually a ConnectionManagerEndpointsCollection, which is the next class defined.  The ConnectionManagerEndpointsCollection class inherits from ConfigurationElementCollection and overrides the requied fields.  The first tells it what type of Element to create when adding a new one (in our case a ConnectionManagerEndpointElement), and a function specifying what property on our ConnectionManagerEndpointElement class is the unique key, which I’ve specified to be the Name field. The last class defined is the actual meat of our elements.  It inherits from ConfigurationElement and specifies the properties of the element (which can then be set in the xml of the App.config).  The “ConfigurationProperty” attribute on each of the properties tells what we expect the name of the property to correspond to in each element in the app.config, as well as some additional information such as if that property is required and what it’s default value should be. Finally, the code to actually access these values would look like this: 1: // Grab the Environments listed in the App.config and add them to our list. 2: var connectionManagerDataSection = ConfigurationManager.GetSection(ConnectionManagerDataSection.SectionName) as ConnectionManagerDataSection; 3: if (connectionManagerDataSection != null) 4: { 5: foreach (ConnectionManagerEndpointElement endpointElement in connectionManagerDataSection.ConnectionManagerEndpoints) 6: { 7: var endpoint = new ConnectionManagerEndpoint() { Name = endpointElement.Name, ServerInfo = new ConnectionManagerServerInfo() { Address = endpointElement.Address, UseSSL = endpointElement.UseSSL, SecurityGroupsAllowedToSaveChanges = endpointElement.SecurityGroupsAllowedToSaveChanges.Split(',').Where(e => !string.IsNullOrWhiteSpace(e)).ToList() } }; 8: AddEndpoint(endpoint); 9: } 10: } This looks very similar to what we had before in the “simple” example.  The main points of interest are that we cast the section as ConnectionManagerDataSection (which is the class we defined for our section) and then iterate over the endpoints collection using the ConnectionManagerEndpoints property we created in the ConnectionManagerDataSection class.   Also, some other helpful resources around using app.config that I found (and for parts that I didn’t really explain in this article) are: How do you use sections in C# 4.0 app.config? (Stack Overflow) <== Shows how to use Section Groups as well, which is something that I did not cover here, but might be of interest to you. How to: Create Custom Configuration Sections Using Configuration Section (MSDN) ConfigurationSection Class (MSDN) ConfigurationCollectionAttribute Class (MSDN) ConfigurationElementCollection Class (MSDN)   I hope you find this helpful.  Feel free to leave a comment.  Happy Coding!

    Read the article

  • Visual studio 2010 MVC 2 (2008 project imported) - publish fails - System.Web.Routing.RouteValueDict

    - by Maslow
    Error 7 The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll' and 'c:\WINNT\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' c:\Projects\VS\solutionfolder\projectfolder\Views\group\List.aspx 44 ProjectName The project utilizes T4MVC.tt if that is relevant. Also Visual studio 2010 ultimate. I did not upgrade the target .net framework to 4.0 because my host will not support this for ~24 hours. I have a .Tests project in the same solution that says it is targeting .net 4.0 but it still won't build even with that unloaded, same message.

    Read the article

  • Web Application Project Deployment VS2010 - Precompile Views

    - by Malcolm Frexner
    Using Visual Studio 2010 Ultimate I created a ASP.NET MVC 2.0 Web Application. I read http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k%28WEBAPPLICATIONPROJECTS.PACKAGEPUBLISHOVERVIEW%29;k%28TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22%29&rd=true. Its about the new features for Web Application Deployment. I dont see an option to precompile Views. Also I dont see other options that where available in previous version of Web Deployment Project: ie if the web is compiled into a single assembly or into one assembly per page. I had the impression that Application Project Deployment is the scuccessor of Web Deployment Project.. maybe I am wrong about it. How should I precompile views now?

    Read the article

  • Where did System.Design go?

    - by Nilbert
    I am making a C# project in which I am using ScintillaNet, and it says: The referenced assembly "ScintillaNet" could not be resolved because it has a dependency on "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. I tried adding a reference to System.Design, but it doesn't exist in my list. Do I need to download it somewhere? I have MS Visual Studio 10.

    Read the article

  • Refferenced by projects .net 4.0 assemblies have no IL. How? and What for?

    - by er-v
    There is something I don't understand. Today I desided to find out what is inside Sistem.Web.dll version 4.0.0.0 So I decided to find the place where this assembly located. and opened this assembly with reflector - all methods were empty - and then with ilDasm from 7.0 SDK. This what I saw After some research I've found fullfeatured assemblies in gac. Actualy here C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Web\82087f17d3b3f9c493e7261d608a6af4 They are much larger in size. So why does references goes not to the gac, but to the C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\ Why don't they have IL inside? How does it works? Mabe I don't understand something.

    Read the article

  • How to be sure that my MVC project is runting on the correct version after upgrade to vs2010?

    - by Stephane
    I just installed visual studio 2010 and upgraded my MVC project (which was running on MVC RC2 in visual studio 2008). visual studio 2010 updated every project file to target the framework 4.0. But the system.web.dll is pointing to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies\System.Web.Mvc.dll in VS2010 object browser, I have every dll showing up in multiple versions as expected (3.5.0.0 and 4.0.0.0) except for the System.Web.Mvc dll which doesn't show any version and points to the path I mentioned above. Isn't this namespace point to the Framework folder like the System.Web namespace? C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll

    Read the article

  • Visual Studio 2010 RC + ASP.NET MVC 2 RTM won't re-target from .NET Framework 4 to 3.5

    - by Solution Evangelist
    Per the above I am trying to re-target a fresh ASP.NET MVC 2 application in Visual Studio 2010 RTM. After all sorts of tweaking the closest I am getting is the error below: The primary reference "System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5". To resolve this problem, either remove the reference "System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Is there anyone who can assist in having this re-targeted to .NET Framework 3.5 (SP1), or is there perhaps a zip file of a VS 2010 + .NET Framework v3.5 + ASP.NET MVC 2 RTM project already online I could grab?

    Read the article

  • .NET 4.0 build issues on CI Server

    - by DMcKenna
    Anybody manage to get .net 4.0 applications compiling on a CI server without installing visual studio 2010 on a CI server. No SDK exists for .net 4.0. Have installed .NET 4.0 on CI Server. Msbuild.exe works for simple projects and give the following warning (GetReferenceAssemblyPaths target) - C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(847,9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in placeof reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

    Read the article

  • How to be sure that my MVC project is running on the correct version after upgrade to vs2010?

    - by Stephane
    I just installed visual studio 2010 and upgraded my MVC project (which was running on MVC RC2 in visual studio 2008). visual studio 2010 updated every project file to target the framework 4.0. But the system.web.dll is pointing to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies\System.Web.Mvc.dll in VS2010 object browser, I have every dll showing up in multiple versions as expected (3.5.0.0 and 4.0.0.0) except for the System.Web.Mvc dll which doesn't show any version and points to the path I mentioned above. Isn't this namespace point to the Framework folder like the System.Web namespace? C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll

    Read the article

1 2  | Next Page >