Search Results

Search found 853 results on 35 pages for 'v4 0'.

Page 25/35 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • FragmentStatePagerAdapter IllegalStateException: <MyFragment> is not currently in the FragmentManager

    - by Ixx
    I'm getting this on some cases, when going back to the activity, which uses a FragmentStatePagerAdapter, using back button of the devices. Not always. Not reproducible. I'm using support package v4, last revision (8). Already searched with google, no success finding a useful answer. Looking in the source, it's thrown here: FragmentManager.java @Override public void putFragment(Bundle bundle, String key, Fragment fragment) { if (fragment.mIndex < 0) { throw new IllegalStateException("Fragment " + fragment + " is not currently in the FragmentManager"); } bundle.putInt(key, fragment.mIndex); } But why is the index of fragment < 0 there? The code instantiating the fragments: @Override public Fragment getItem(int position) { Fragment fragment = null; switch(position) { case 0: fragment = Fragment1.newInstance(param1); break; case 1: fragment = MyFragment2.newInstance(param2, param3); break; } return fragment; } @Override public int getCount() { return 2; } I also can't debug through the source since the support package doesn't let me attach the source, for some reason... but that's a different question...

    Read the article

  • Running MSBuild fails to read SDKToolsPath

    - by Scott Mayfield
    Howdy, I'm having a bit of an issue runnning a NAnt script that used to properly build my .Net 2.0 based website, when compiling with VS2008 and it's associated tools. I've recently upgraded all the project/solution files to VS2010, and now my build fails with the following error: [exec] C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(2249,9): error MSB3086: Task could not find "sgen.exe" using the S dkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed Now, I DO have prior versions (.Net 3.5) of the Windows SDK installed on the build server, and the full .Net 4.0 framework is installed, but I've not run across a .Net 4.0 specific version of the Windows SDK. After a bit of experimentation and research, I finally just setup a new environmental variable "SDKToolsPath" and pointed it to the copy of sgen.exe in my windows 6.0 sdk folder. This generated the same error, but it got me to notice that even though the SDKToolsPath environmental variable IS set (confirmed that I can "echo" it at the command line and it has the expected value), the error message seems to indicated that it's not being read (note the empty quotes). Most of the information I've found is .Net 3.5 (or earlier) specific. Not much 4.0 related out there yet. Searching for error code MSB3086 generated nothing useful either. Any idea what this might be? Scott

    Read the article

  • How to troubleshoot errors with TeamCity

    - by Tomas Lycken
    I'm following this guide to set up a small environment for source control and automated builds - mostly for learning what it is and how it works, but also for using in those of my hobby projects that I believe will actually be useful some day. However, at the step where he commits and builds, I fail to get a success status in the TeamCity history log. I keep getting the error described in the stack trace below. I have verified with Windows Explorer that the solution file it can't find is actually there, so I really don't know what to do. How do I fix/troubleshoot this? [15:16:06]: Checking for changes [15:16:08]: Clearing temporary directory: C:\Program Files\JetBrains\BuildAgent\temp\buildTmp [15:16:08]: Checkout directory: C:\Program Files\JetBrains\BuildAgent\work\72d50012f70c4588 [15:16:08]: Updating sources: server side checkout... [15:16:08]: [Updating sources: server side checkout...] Building incremental patch for VCS root: DemoProjects [15:16:09]: [Updating sources: server side checkout...] Repository sources transferred [15:16:09]: [Updating sources: server side checkout...] Updating C:\Program Files\JetBrains\BuildAgent\work\72d50012f70c4588 [15:16:10]: Start process: "c:\Program Files\JetBrains\BuildAgent\bin\..\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe" "/workdir:C:\Program Files\JetBrains\BuildAgent\work\72d50012f70c4588" /msbuildPath:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe [15:16:10]: in: C:\Program Files\JetBrains\BuildAgent\work\72d50012f70c4588 [15:16:11]: TeamCity MSBuild bootstrap v5.1 Copyright (C) JetBrains s.r.o. [15:16:11]: Application failed with internal error: [15:16:11]: Failed to find project file at path: C:\Program Files\JetBrains\BuildAgent\work\72d50012f70c4588\Nehemia\trunk\Nehemiah.sln [15:16:11]: System.Exception: Failed to find project file at path: C:\Program Files\JetBrains\BuildAgent\work\72d50012f70c4588\Nehemia\trunk\Nehemiah.sln [15:16:11]: at JetBrains.BuildServer.MSBuildBootstrap.Impl.MSBuildBootstrapFactory.Create(IClientRunArgs args) in c:\Agent\work\6223f0c8b1d45aaa\src\MSBuildBootstrap.Core\src\Impl\MSBuildBootstrapFactory.cs:line 25 [15:16:11]: at JetBrains.BuildServer.MSBuildBootstrap.Program.Run(String[] _args) in c:\Agent\work\6223f0c8b1d45aaa\src\MSBuildBootstrap\src\Program.cs:line 66 [15:16:11]: Process exited with code -11 [15:16:11]: Build finished

    Read the article

  • Problems with builds on TFS 2010 and resolving dependencies

    - by Jimmy Engtröm
    Hi I have a project that works great on my machine (and production servers). It's a VS2010 project running C#3.5. When letting my build server build the solution it can't resolve a couple of my third party dll's. Error message: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3268: The primary reference "Third.Party.Assembly, Version=50.11.2.0, Culture=neutral, PublicKeyToken=0561a7c6dbd6f0ea, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "Microsoft.VisualBasic.Compatibility, Version=8.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 "Third.Party.Assembly, Version=50.11.2.0, Culture=neutral, PublicKeyToken=0561a7c6dbd6f0ea, processorArchitecture=MSIL" or retarget your application to a framework version which contains "Microsoft.VisualBasic.Compatibility, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". [d:\Builds\3\mySolution.sln] Everything compiles and runs great on my machine, but the build server seem to struggle. I think the Third.Party.Assembly is written in VB.net. Since the assembly is third party I can't remove the reference to "Microsoft.VisualBasic.Compatibility" and since I don't get any warnings on my computer could it really be that I'm running v3.5? Any suggestions? /Jimmy

    Read the article

  • "OutputPath property is not set" error occurs only when calling MSBuild in CCNET

    - by LostInCCNET
    I've made an MSBuild project that simply does an msbuild task with our solution file as parameter. I've defined a BeforeBuild target where I set some properties, and a Build target that executes the msbuild task. I've confirmed that no errors occured when building the msbuild script in the command line console. However, when I use it in the msbuild task in my CCNET project, I keep getting the following error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (483,9): error: The OutputPath property is not set for project 'MyProject.msbuild'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. I checked the build log and it seems that the error occurs during _CheckForInvalidConfigurationAndPlatform. It wasn't even able to continue to my Build task! Since the script is only intended to build the solution under Debug/Release and AnyCPU as platform, I tried to add the following lines to my msbuild project: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>.\bin\Debug\</OutputPath> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <OutputPath>.\bin\Release\</OutputPath> </PropertyGroup> I could still build the project without errors in the command line, but CCNET is returning the same error mentioned above. I don't understand why CCNET keeps getting the error, and I don't know what else to try. Please help.

    Read the article

  • System.MissingMethodException for XslCompiledTransform.Transform when running application on differe

    - by Codesleuth
    I have a problem where I compiled my application on Visual Studio 2010 while targetting the .NET Framework 3.5, deployed it to a client server, only to find it gives me the following error: ************** Exception Text ************** System.MissingMethodException: Method not found: 'Void System.Xml.Xsl.XslCompiledTransform.Transform( System.Xml.XPath.IXPathNavigable, System.Xml.Xsl.XsltArgumentList, System.Xml.XmlWriter, System.Xml.XmlResolver)'. ************** Loaded Assemblies ************** [...] System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3082 (QFE.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll The method it says it's looking for is this: XslTransform.Transform Method (IXPathNavigable, XsltArgumentList, XmlWriter, XmlResolver) (Supported in: 4, 3.5, 3.0, 2.0, 1.1) I've tried setting up a redirect to the .NET Framework 4.0 version of the same DLL using the assemblyBinding element like so: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture="neutral" /> <bindingRedirect oldVersion="2.0.0.0" newVersion="4.0.0.0"/> <codeBase version="4.0.0.0" href="file:///C:/WINDOWS/Microsoft.NET/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll" /> </dependentAssembly> </assemblyBinding> </runtime> But now the application won't run, and puts this in the event log: EventType clr20r3, P1 myapplication.exe, P2 3.85.12.27583, P3 4be9757f, P4 system.configuration, P5 2.0.0.0, P6 4889de74, P7 1a6, P8 136, P9 ioibmurhynrxkw0zxkyrvfn0boyyufow, P10 NIL. So, in summary, (1) does anyone know why the application can't find the method listed, and (2) why doesn't it let me redirect to the .NET 4.0 version of System.Xml? Any help is appreciated, I'm totally stuck!

    Read the article

  • AppFabric Cache - An existing connection was forcibly closed by the remote host

    - by Wallace Breza
    I'm trying to get AppFabric cache up and running on my local development environment. I have Windows Server AppFabric Beta 2 Refresh installed, and the cache cluster and host configured and started running on Windows 7 64-bit. I'm running my MVC2 website in a local IIS website under a v4.0 app pool in integrated mode. HostName : CachePort Service Name Service Status Version Info -------------------- ------------ -------------- ------------ SN-3TQHQL1:22233 AppFabricCachingService UP 1 [1,1][1,1] I have my web.config configured with the following: <configSections> <section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere"/> </configSections> <dataCacheClient> <hosts> <host name="SN-3TQHQL1" cachePort="22233" /> </hosts> </dataCacheClient> I'm getting an error when I attempt to initialize the DataCacheFactory: protected CacheService() { _cacheFactory = new DataCacheFactory(); <-- Error here _defaultCache = _cacheFactory.GetDefaultCache(); } I'm getting the ASP.NET yellow error screen with the following: An existing connection was forcibly closed by the remote host Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host Source Error: Line 21: protected CacheService() Line 22: { Line 23: _cacheFactory = new DataCacheFactory(); Line 24: _defaultCache = _cacheFactory.GetDefaultCache(); Line 25: }

    Read the article

  • Weird - "The EntityReference object could not be serialized" when serializing from an ASP.NET Web Si

    - by Mikey Cee
    I have an Entity Framework data model. Part of the model is a Customer entity. The web service provides a method to get a customer, and to receive an updated version of this customer to be persisted. To test this, I created a new ASP.NET web Application, (Solution Add New Project ASP.NET Web Application), then added a reference to my service reference using the standard Add Service Reference dialog. I then call the service using the following code: var client = new CustomerServiceClient(); var customer = client.GetCustomerByID(18); // get it customer.LimitDown = 100; // change it client.SaveCustomer(customer); // persist it Everything works as expected. Now, I do exactly the same thing, but this time with as ASP.NET Web Site (Solution Add New Web Site ASP.NET Web Site). I add the reference in a similar fashion and copy and paste the code above into the new site. But now I get the following exception thrown on the 4th line: System.InvalidOperationException The EntityReference object could not be serialized. This type of object cannot be serialized when the RelationshipManager belongs to an entity object that does not implement IEntityWithRelationships. Source Error: Line 2474: Line 2475: public SkyWalkerCustomerService.OperationResult SaveCustomer(SkyWalkerCustomerService.Customer customer) { Line 2476: return base.Channel.SaveCustomer(customer); Line 2477: } Line 2478: } Stack Trace: System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +9475203 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +345 SkyWalkerCustomerService.ICustomerService.SaveCustomer(Customer customer) +0 SkyWalkerCustomerService.CustomerServiceClient.SaveCustomer(Customer customer) in c:\Windows\Microsoft.NET\Framework\v4.0.30128\Temporary ASP.NET Files\testsite2\dd2bcf8d\f95604ff\App_WebReferences.fz4h7x7l.0.cs:2476 _Default.Page_Load(Object sender, EventArgs e) in c:\Users\Mike\Documents\Repositories\UWC\SkyWalker\TestSite2\Default.aspx.cs:17 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91 System.Web.UI.Control.LoadRecursive() +61 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1966 Googling for this error returns very little. Why doesn't this work?

    Read the article

  • Deploying an MVC 2.0 .Net 4.0 application to Windows Server 2003

    - by Brett Rigby
    I've spent the past couple of nights on this, and have come to the conclusions that I'm doing something wrong! Basically, I have my .Net 4.0 MVC 2.0 application deployed to my 2003 Server and it's constantly giving me the following error: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the element of the Web.config file. I also have the .Net 3.5 MVC 1.0 application also deployed to the same server (from before the upgrade to .Net 4.0), and it works absolutely fine. I have re-run through Phil Haack's post on IIS6, making the necessary changes for .Net 4.0, but no luck. I have been through the steps in the British Developer's post too, but no joy. I have also tried the steps outlined in Johan's blog post, but the settings he mentions were already enabled. Obviously, I can't simply upgrade to a 2008 box, nor do I want to downgrade my software back to < 4.0 - any other ideas?

    Read the article

  • Unable to debug XBAP with Visual Studio 2010

    - by Oleg I.
    Just migrated my project to Visual Studio 2010, but target framework was left 3.5. Project contains an XBAP app in partial trust and a bunch of WCF services. Debugging is configured to start PresentationHost.exe with -debug and -debugSecurityZoneUrl parameters. Under VS2008 everything works fine, and in VS2010 Beta2 (don't sure about RC), but under VS2010 RTM debugging is for some reason doesn't working. Application runs, but doesn't hit any breakpoint. And if for example exception occurs, message box appears "Do you wish to debug or close..." and after I choose "debug" option new weird message box appears: --------------------------- Warning --------------------------- A debugger is attached to PresentationHost.exe but not configured to debug this unhandled exception. To debug this exception, detach the current debugger. An unhandled exception was raised from Microsoft .NET Framework v 1.0, 1.1, or 2.0, but the current debugger is configured to debug Microsoft .NET Framework v4.0 code. Examine the exception using the SOS tool. --------------------------- OK --------------------------- And where is the vaunted multitargeting? Did anyone have already bumped into same issue? UPDATE: Tried to debug with "Start browser with URL" option. Debugging is working, but I get SecurityException. So it is possible, just need to figure out how to make it work with "Start external program" option. UPDATE2: Checked what PresentationHost is actually loads in both scenarios: "Start external program" - Latest version (4.0.31106.0) from C:\Windows\System32\ "Start browser with URL" - Old version (3.0.6920.4902) from C:\Windows\winsxs\x86_wpf-presentationhostexe_31bf3856ad364e35_6.1.7600.16385_none_6fca8974817173aa

    Read the article

  • Problem resolving a generic Repository with Entity Framework and Castle Windsor Container

    - by user368776
    Hi, im working in a generic repository implementarion with EF v4, the repository must be resolved by Windsor Container. First the interface public interface IRepository<T> { void Add(T entity); void Delete(T entity); T Find(int key) } Then a concrete class implements the interface public class Repository<T> : IRepository<T> where T: class { private IObjectSet<T> _objectSet; } So i need _objectSet to do stuff like this in the previous class public void Add(T entity) { _objectSet.AddObject(entity); } And now the problem, as you can see im using a EF interface like IObjectSet to do the work, but this type requires a constraint for the T generic type "where T: class". That constrait is causing an exception when Windsor tries to resolve its concrete type. Windsor configuration look like this. <castle> <components> <component id="LVRepository" service="Repository.Infraestructure.IRepository`1, Repository" type="Repository.Infraestructure.Repository`1, Repository" lifestyle="transient"> </component> </components> The container resolve code IRepository<Product> productsRep =_container.Resolve<IRepository<Product>>(); Now the exception im gettin System.ArgumentException: GenericArguments[0], 'T', on 'Repository.Infraestructure.Repository`1[T]' violates the constraint of type 'T'. ---> System.TypeLoadException: GenericArguments[0], 'T', on 'Repository.Infraestructure.Repository`1[T]' violates the constraint of type parameter 'T'. If i remove the constraint in the concrete class and the depedency on IObjectSet (if i dont do it get a compile error) everything works FINE, so i dont think is a container issue, but IObjectSet is a MUST in the implementation. Some help with this, please.

    Read the article

  • Program and debugger quit without indication of problem

    - by spender
    OK, not quite a Heisenbug but similar in nature. I'm developing a WPF application. When debugging, the logic reaches a certain point, then the application quits for no reason. VS debugger catches nothing and the only indication of a problem is the following in the output window: The program '[6228] SomeApp.vshost.exe: Managed (v4.0.30319)' has exited with code 1073741855 (0x4000001f). When debugging the release version, or indeed running the debug build out of the debugger (in fact all combos that aren't running the debug version in debugger), everything works fine. I'm trying to catch unhandled exceptions with the following code: AppDomain .CurrentDomain .UnhandledException += (sender, e) => { Debug.WriteLine("Unhandled Exception " + e.ExceptionObject); }; Application .Current .DispatcherUnhandledException += (sender1, e1) => { Debug.WriteLine("DispatcherUnhandledException " + e1.Exception); }; ...but I'm not catching anything. I'm considering peppering the app with debug output statements, but it's highly asynchronous so reading this will be both arduous and tedious. So tell me, if you can... how do I start figuring WTF is going on?

    Read the article

  • HttpUtility does not exist in the current context

    - by Shaihi
    I get this error when compiling a C# application. Looks like a trivial error, but I can't get around it. My setup is Windows 7 64 bit. Visual-Studio 2010 C# express B2Rel. I added a reference to System.Web.dll located at C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0, but it has a yellow exclamation symbol and I still get the above error. I also have the using System.Web declaration. What am I doing wrong? Update: After getting the prompt answer pointing me at the root cause, I searched a bit in Google to where it states that System.Web.dll is for the full framework. I did not find such a reference. For newbies like me, this blog summarizes the difference between the frameworks (client and full) nicely. I could not find a spot that says whether a certain Dll is supported in the client framework or not. I guess the exclamation mark in Visual Studio should be the first signal...

    Read the article

  • MissingMethodException when running application on different computer

    - by Codesleuth
    I have a problem where I compiled my application on Visual Studio 2010 while targetting the .NET Framework 3.5, deployed it to a client server, only to find it gives me the following error: ************** Exception Text ************** System.MissingMethodException: Method not found: 'Void System.Xml.Xsl.XslCompiledTransform.Transform( System.Xml.XPath.IXPathNavigable, System.Xml.Xsl.XsltArgumentList, System.Xml.XmlWriter, System.Xml.XmlResolver)'. ************** Loaded Assemblies ************** [...] System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3082 (QFE.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll The method it says it's looking for is this: XslTransform.Transform Method (IXPathNavigable, XsltArgumentList, XmlWriter, XmlResolver) (Supported in: 4, 3.5, 3.0, 2.0, 1.1) I've tried setting up a redirect to the .NET Framework 4.0 version of the same DLL using the assemblyBinding element like so: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture="neutral" /> <bindingRedirect oldVersion="2.0.0.0" newVersion="4.0.0.0"/> <codeBase version="4.0.0.0" href="file:///C:/WINDOWS/Microsoft.NET/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll" /> </dependentAssembly> </assemblyBinding> </runtime> But now the application won't run, and puts this in the event log: EventType clr20r3, P1 myapplication.exe, P2 3.85.12.27583, P3 4be9757f, P4 system.configuration, P5 2.0.0.0, P6 4889de74, P7 1a6, P8 136, P9 ioibmurhynrxkw0zxkyrvfn0boyyufow, P10 NIL. So, in summary, (1) does anyone know why the application can't find the method listed, and (2) why doesn't it let me redirect to the .NET 4.0 version of System.Xml? Any help is appreciated, I'm totally stuck!

    Read the article

  • Referencing .NET Assembly in VB6 won't work

    - by dretzlaff17
    I wrote a .net assembly using c# to perform functions that will be used by both managed and unmanaged code. I have a VB6 project that now needs to use the assembly via COM. I created my .net assembly, made sure that ComVisible is set to true and that it is registered for COM interop via project properties. public class MyClass [ComVisible(true)] public string GetResponse() { return "Testing Response" } } I build the assembly and copied the file into a folder. TestInterop.dll I then run a batch file to register the assembly tool to register the object for COM. cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\ regasm "c:\Program Files\TestApp\TestInterop.dll" /tlb:TestInterop.tlb I open a new VB6 application and reference TestInterop.dll In VB6 I write the following code and it compiles. Dim obj as TestInterop.MyClass Set obj = new TestInterop.MyClass Dim strTest as string strTest = obj.GetRespose() When I run the program it errors on the obj.GetResponse() line. Run-time error' -2147024894 (80070002'): Automation error The system cannot find the file specified Also, the intellesense does not work on obj. I had to type the GetResponse method. Is this normal? Does anyone have any clue what could be wrong or what steps I missed. Thanks!

    Read the article

  • CSharpCodeProvider doesn't return compiler warnings when there are no errors

    - by Sandor Drieënhuizen
    I'm using the CSharpCodeProvider class to compile a C# script which I use as a DSL in my application. When there are warnings but no errors, the Errors property of the resulting CompilerResults instance contains no items. But when I introduce an error, the warnings suddenly get listed in the Errors property as well. string script = @" using System; using System; \\ generate a warning namespace MyNamespace { public class MyClass { public void MyMethod() { \\ uncomment the next statement to generate an error \\intx = 0; } } } "; CSharpCodeProvider provider = new CSharpCodeProvider( new Dictionary<string, string>() { { "CompilerVersion", "v4.0" } }); CompilerParameters compilerParameters = new CompilerParameters(); compilerParameters.GenerateExecutable = false; compilerParameters.GenerateInMemory = true; CompilerResults results = provider.CompileAssemblyFromSource( compilerParameters, script); foreach (CompilerError error in results.Errors) { Console.Write(error.IsWarning ? "Warning: " : "Error: "); Console.WriteLine(error.ErrorText); } So how to I get hold of the warnings when there are no errors? By the way, I don't want to set TreatWarningsAsErrors to true.

    Read the article

  • Can't get NUnit to work in Visual Web Develper 2010 express.

    - by UkraineTrain
    First off I was wondering whether it's possible to implement a functionality with Nunit where each time a project is created in Visual Web Developer 2010 I get a dialog asking whether I want to create a unit test project for current application like I saw it happen in the older versions of Visual Web Developer. I've tried just about everything to get NUnit 2.5.5 to work in Visual Web Developer 2010. For example, in nunit.exe.config I added under configuration <startup> <requiredRuntime version="v4.0.30319" /> </startup> and under runtime: <loadFromRemoteSources enabled="true" /> I then tried to launch nunit-console.exe in order to specify in the command line the option /framework=net-4.0, but the console would appear and instantly disappear. It didn't help when I tried running it as an administrator. I've also tried using Nunit as an external tool inside the Visual Web Developer by creating a toolbar as described in the following link: http://www.marthijnvandenheuvel.com/2010/06/09/using-nunit-in-visual-studio-2010/. It shows up as an icon in the toolbar. I ran my project called ToyStore and then clicked Nunit icon in order to launch it and it gave me a "System.IO.FileNotFoundException:Assembly not found:ToyStore.dll". So, needless to say, I'm pretty lost and don't know what to do and would greatly appreciate any help in getting Nunit to work.

    Read the article

  • php: fopen() of an URL breaks for domain names, not for numerical addresses

    - by b0fh
    After hours of trying to debug a third-party application having trouble with fopen(), i finally discovered that php -r 'echo(file_get_contents("http://www.google.com/robots.txt"));' fails, but php -r 'echo(file_get_contents("http://173.194.32.81/robots.txt"));' Succeeds. Note that as the webserver user, I can ping www.google.com and it resolves just fine. I straced both executions of PHP, and they diverge like this: For the numerical v4 URL: socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("173.194 poll([{fd=3, events=POLLOUT}], 1, 0) = 0 (Timeout) ...[bunch of poll/select/recvfrom]... close(3) = 0 For the domain name: socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3 close(3) = 0 PHP didn't even try to do anything with that socket, it seems. Or even resolve the domain, for that matter. WTF ? Recompiling PHP with or without ipv6 support did not seem to matter. Disabling ipv6 on this system is not desirable. Gentoo Linux, PHP 5.3.14, currently giving a try to PHP 5.4 and see if it helps. Anyone has an idea ? EDIT: php -r 'echo gethostbyname("www.google.com");' Works and yield an ipv4, while php -r 'echo(file_get_contents("http://[2a00:1450:4007:803::1011]/"));' Seems to return a blank result. EDIT 2: I didn't even notice the first time, that the v6 socket opened when the name is used is a SOCK_DGRAM.

    Read the article

  • F# and .Net versions

    - by rwallace
    I'm writing a program in F# at the moment, which I specified in the Visual Studio project setup to target .Net 3.5, this being the highest offered, on the theory that I might as well get the best available. Then I tried just now running the compiled program on an XP box, not expecting it to work, but just to see what would happen. Unsurprisingly I just got an error message demanding an appropriate version of the framework, but surprisingly it wasn't 3.5 it demanded, but 2.0.50727. An additional puzzle is the version of MSBuild I'm using to compile the release version of the program, which I found in the framework 3.5 directory but claims to be framework 2.0 and build engine 3.5. I just guessed it was the right version of MSBuild to use because it seemed to correspond with the highest framework version F# seems to be able to target, but should I be using a different version? Anyone have any idea what's going on? C:\Windows>dir/s msbuild.exe Volume in drive C is OS Volume Serial Number is 0422-C2D0 Directory of C:\Windows\Microsoft.NET\Framework\v2.0.50727 27/07/2008 19:03 69,632 MSBuild.exe 1 File(s) 69,632 bytes Directory of C:\Windows\Microsoft.NET\Framework\v3.5 29/07/2008 23:40 91,136 MSBuild.exe 1 File(s) 91,136 bytes Directory of C:\Windows\Microsoft.NET\Framework\v4.0.30319 18/03/2010 16:47 132,944 MSBuild.exe 1 File(s) 132,944 bytes Directory of C:\Windows\winsxs\x86_msbuild_b03f5f7f11d50a3a_6.0.6000.16386_none_815e96e1b0e084be 20/10/2006 02:14 69,632 MSBuild.exe 1 File(s) 69,632 bytes Directory of C:\Windows\winsxs\x86_msbuild_b03f5f7f11d50a3a_6.0.6000.16720_none_81591d45b0e55432 27/07/2008 19:00 69,632 MSBuild.exe 1 File(s) 69,632 bytes Directory of C:\Windows\winsxs\x86_msbuild_b03f5f7f11d50a3a_6.0.6000.20883_none_6a9133e9ca879925 27/07/2008 18:55 69,632 MSBuild.exe 1 File(s) 69,632 bytes C:\Windows>cd Microsoft.NET\Framework\v3.5 C:\Windows\Microsoft.NET\Framework\v3.5>msbuild /ver Microsoft (R) Build Engine Version 3.5.30729.1 [Microsoft .NET Framework, Version 2.0.50727.3053] Copyright (C) Microsoft Corporation 2007. All rights reserved. 3.5.30729.1

    Read the article

  • Guaranteed way to find the ildasm.exe and ilasm.exe files regardless of .NET version/environment?

    - by m-y
    Is there a way to programmatically get the FileInfo/Path of the ildasm.exe/ilasm.exe executables? I'm attempting to decompile and recompile a dll/exe file appropriately after making some alterations to it (I'm guessing PostSharp does something similar to alter the IL after the compilation). I found a blog post that pointed to: var pfDir = Environment.GetFolderPath(Environment.SpecialFolders.ProgramFiles)); var sdkDir = Path.Combine(pfDir, @"Microsoft SDKs\Windows\v6.0A\bin"); ... However, when I ran this code the directory did not exist (mainly because my SDK version is 7.1), so on my local machine the correct path is @"Microsoft SDKs\Windows\v7.1\bin". How do I ensure I can actually find the ildasm.exe? Similarly, I found another blog post on how to get access to ilasm.exe as: string windows = Environment.GetFolderPath(Environment.SpecialFolder.System); string fwork = Path.Combine(windows, @"..\Microsoft.NET\Framework\v2.0.50727"); ... While this works, I noticed that I have Framework and Framework64, and within Framework itself I have all of the versions up to v4.0.30319 (same with Framework64). So, how do I know which one to use? Should it be based on the .NET Framework version I'm targetting? Summary: How do I appropriately guarantee to find the correct path to ildasm.exe? How do I appropriately select the correct ilasm.exe to compile?

    Read the article

  • Apache tomcat7 + couchdb in the same host

    - by demotics2002
    I couldn't find any guide on the internet about how to make them work together. I found some couchdb tutorials but they are mostly having the web pages hosted in couchdb's own webserver. My requirement: 1. Use tomcat 7 (or other versions) - i will be using jsp for the website. It has some features that require file upload and processing of files, file generation, and etc., that will require java. It also has admin console that will require the next item, 2. ExtJS (maybe V4) - I will be needing this in the admin console page for restful access to couchdb and other ui components (sorry but I am not considering jquery at the moment because I am already familiar with . 3. Couchdb - because the client needs a dynamic structure of data. Now my question is how to make tomcat and couchdb run on the same host (and port of course)? As much as possible I would like to avoid making my pages doing cross domain js calls. Worst case I may have to create a servlet that overrides put|get|post|delete that calls couchdb (either by using a driver or httpclient).

    Read the article

  • Project Euler (P14): recursion problems

    - by sean mcdaid
    Hi I'm doing the Collatz sequence problem in project Euler (problem 14). My code works with numbers below 100000 but with numbers bigger I get stack over-flow error. Is there a way I can re-factor the code to use tail recursion, or prevent the stack overflow. The code is below: import java.util.*; public class v4 { // use a HashMap to store computed number, and chain size static HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>(); public static void main(String[] args) { hm.put(1, 1); final int CEILING_MAX=Integer.parseInt(args[0]); int len=1; int max_count=1; int max_seed=1; for(int i=2; i<CEILING_MAX; i++) { len = seqCount(i); if(len > max_count) { max_count = len; max_seed = i; } } System.out.println(max_seed+"\t"+max_count); } // find the size of the hailstone sequence for N public static int seqCount(int n) { if(hm.get(n) != null) { return hm.get(n); } if(n ==1) { return 1; } else { int length = 1 + seqCount(nextSeq(n)); hm.put(n, length); return length; } } // Find the next element in the sequence public static int nextSeq(int n) { if(n%2 == 0) { return n/2; } else { return n*3+1; } } }

    Read the article

  • How to target multiple versions of .NET Framework from MSBuild?

    - by McKAMEY
    I am improving the builds for an open source project which currently supports .NET Framework v2.0, v3.5, and now v4.0. Up until now, I've restricted myself to v2.0 to ensure compatibility, but with VS2010 I am interested in having real targeted builds. I'm looking for some guidance on how to edit the MSBuild csproj/sln to be able to cleanly produce builds for each target. I'm willing to have complexity in the csproj and in a batch file to control the build. My goal is to be able to have a command line script that could produce the builds without needing Visual Studio installed, but only the necessary .NET Framework(s). Ideally, I'd like to minimize dependencies on additional software. I notice that a lot of people use NAnt (e.g. Ninject builds many targets with NAnt) but I'm unsure if this is necessary or if they are just more familiar with it. I'm pretty sure this can be done but am having trouble finding a definitive guide on setting it up and best practices. Bonus: my next step after getting this set up will be to better support Mono Framework. Any help on doing this same thing for Mono would be much appreciated.

    Read the article

  • C# compiler error CS0006: metadata file is not found

    - by Rob
    I've built a c# compiler using the tutorial on MSDN and a few other resources including here, and I've gotten it to work until I add additional reference assemblies. My errors stem from adding "System.dll" and "System.Windows.Forms.dll" to the ReferenceAssemblies list. here's my code: private void SetUpCompilingParameters() { string ver = string.Format("{0}.{1}.{2}", Environment.Version.Major, Environment.Version.MajorRevision, Environment.Version.Build); string libDir = string.Format(@"{0}", Environment.CurrentDirectory); string raDir = @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"; string exWpfDir = string.Format(@"C:\WINDOWS\Microsoft.NET\Framework\v{0}\WPF", ver); string exDir = string.Format(@"C:\WINDOWS\Microsoft.NET\Framework\v{0}", ver); MyCompiler = new CSharpCodeProvider(); CompilingParam = new CompilerParameters(); CompilingParam.GenerateExecutable = false; CompilingParam.GenerateInMemory = true; CompilingParam.IncludeDebugInformation = false; CompilingParam.TreatWarningsAsErrors = false; CompilingParam.CompilerOptions = string.Format("/lib:{0}", libDir); CompilingParam.CompilerOptions = string.Format("/lib:{0}", raDir); CompilingParam.CompilerOptions = string.Format("/lib:{0}", exDir); //CompilingParam.CompilerOptions = string.Format("/lib:{0}", exWpfDir); CompilingParam.ReferencedAssemblies.Add("System.dll"); CompilingParam.ReferencedAssemblies.Add("System.Windows.Forms.dll"); } As you can see, I've explicitly referenced directories in CompilerOptions but its not helping. I'd like to test the solution on here on stackoverflow that utilizes: CompilingParam.ReferencedAssemblies.Add(typeof(System.Xml.Linq.Extensions).Assembly.Location); but I'm having trouble using it for the general System.dll etc...

    Read the article

  • C++ boost.asio server and client connection undersanding

    - by Edgar Buchvalov
    i started learning boost.asio and i have some problems with undersanding tcp connections. There is example from official boost site: #include <ctime> #include <iostream> #include <string> #include <boost/asio.hpp> using boost::asio::ip::tcp; std::string make_daytime_string() { using namespace std; // For time_t, time and ctime; time_t now = time(0); return ctime(&now); } int main() { try { boost::asio::io_service io_service; tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 13)); for (;;) { tcp::socket socket(io_service); acceptor.accept(socket); std::string message = make_daytime_string(); boost::system::error_code ignored_error; boost::asio::write(socket, boost::asio::buffer(message), boost::asio::transfer_all(), ignored_error); } } catch (std::exception& e) { std::cerr << e.what() << std::endl; } return 0; } there is question, why if i want to connet to this server via client i have t write: boost::asio::io_service io_service; tcp::resolver resolver(io_service); tcp::resolver::query query(host_ip, "daytime"); //why daytime? tcp::resolver::iterator endpoint_iterator = resolver.resolve(query); tcp::resolver::iterator end; why daytime?, what it meant and where it is inicialized in server, or i just doesn't missed somefing? there is full client code : www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/tutorial/tutdaytime1.html thanks for explanation in advance

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >