Search Results

Search found 2613 results on 105 pages for 'mike driscoll'.

Page 7/105 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • CS1685 Warning causes a CS0433 error when targeting 3.5 in VS2010

    - by Adam Driscoll
    I have a 2010 project that is targeting .NET v3.5. It was working fine until I started to mess with configurations a bit and now I cannot figure out what I'm doing wrong. The project doesn't have ANY references added. It won't even let me add a reference to System.Core as it is added by the 'build system'. warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' IFilter.cs(82,49): error CS0433: The type 'System.Func' exists in both 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' Looks like something is grabbing onto 4.0 but I'm not quite sure how to fix it. Any one else run into this?

    Read the article

  • Host a IWpfTextView in a custom tool for a Visual Studio Extension

    - by Adam Driscoll
    I'm trying to create a IWpfTextView and then put it into a custom tool window. I can create the view, read a file to populate the ITextBuffer and display the view into my tool. I cannot edit the code at all and the code is not syntax highlighted. What steps am I missing to make this a full fledged editor? Code: IComponentModel componentModel = (IComponentModel)GetGlobalService (typeof(SComponentModel)); var _textEditorFactoryService = componentModel.GetService<ITextEditorFactoryService>(); var _textBufferFactoryService = componentModel.GetService<ITextBufferFactoryService>(); var _contentTypeRegistryService = componentModel.GetService<IContentTypeRegistryService>(); TextReader reader = new StreamReader(fileName); var types = _contentTypeRegistryService.GetContentType("CSharp"); ITextBuffer textBuffer = _textBufferFactoryService.CreateTextBuffer(reader, types); var view = _textEditorFactoryService.CreateTextView(textBuffer); IWpfTextViewHost editor = _textEditorFactoryService.CreateTextViewHost(view, true);

    Read the article

  • PowerShell - Parameter Value Tab Expansion for Enum types

    - by Adam Driscoll
    Is it possible to implement parameter value tab expansion for enum parameter types? Creating a binary cmdlet with parameter definition: [Parameter] public SomeEnum Type {get;set;} Is there some way to type: Add-MyThing -Type S<tab> To get: Add-MyThing -Type SomeEnumValue Where: public enum SomeEnum { SomeEnumValue, SomeEnumValue2 } I know it may be possible with overriding the TabExpansion function but I was wondering if there was something I could do within my cmdlet to expose this type of functionality.

    Read the article

  • Visual Studio 2010 64-bit COM Interop Issue

    - by Adam Driscoll
    I am trying to add a VC6 COM DLL to our VS2010RC C# solution. The DLL was compiled with the VC6 tools to create an x86 version and was compiled with the VC7 Cross-platform tools to generate a VC7 DLL. The x86 version of the assembly works fine as long as the consuming C# project's platform is set to x86. It doesn't matter whether the x64 or the x86 version of the DLL is actually registered. It works with both. If the platform is set to 'Any CPU' I receive a BadImageFormatException on the load of the Interop.<name>.dll. As for the x64 version, I cannot even get the project to build. I receive the tlbimp error: TlbImp : error TI0000: A single valid machine type compatible with the input type library must be specified. Has anyone seen this issue? EDIT: I've done a lot more digging into this issue and think this may be a Visual Studio bug. I have a clean solution. I bring in my COM assembly with language agnostic 'Any CPU' selected. The process architecture of the resulting Interop DLL is x86 rather than MSIL. May have to make the Interop by hand for now to get this to work. If anyone has another suggestion let me know.

    Read the article

  • WPF FrameworkElement Parent and Moving a UIElement

    - by Adam Driscoll
    I'm trying to move a control from one parent to another (if this will work I'm not quite sure). I can get a hold of the control that I want to move. Here is my code: public void MoveElement(UIElement uiElement) { var element = ((FrameworkElement)uiElement).Parent; //TODO:Remove from parent myControl.Children.Add(uiElement); } When I hit the last statment an ArgumentException is thrown stating "Specified Visual is already a child of another Visual or the root of a CompositionTarget." The strange thing is that Parent is returning null. How do locate the parent? Will this even work?

    Read the article

  • WNetAddConnection2 in Windows 7 with Impersonation and no Error Code

    - by Adam Driscoll
    I'm doing some crazy impersonation stuff to get around UAC dialogs in Windows 7 so the user does not have to interact with the UI (I have the admin creds of course). I have a process running as the Administrator and elevated past UAC. The issue that I'm facing is that when I make a call to WNetAddConnection2, within this process, I am not getting a new mapped net drive. The function returns ERROR_SUCCESS but no net drive is visible. We have another method of adding network drives using 'subst' but this, again, returns successful does does not add a net drive. I have tried to use the default user (which is the Administrator because of process's security context) and I have tried using specific user credentials. I can map the drive just fine through Explorer. Of course the same functionality works fine in XP/2003. I haven't got around to testing on Vista because of issues with impersonation that are limiting my ability to spin up the process. Are there unique Windows 7 limits on this function? MSDN does not glean any that I can find. Any help would be greatly appreciated!

    Read the article

  • Visual Studio 2010 Can no longer build .NET v3.5

    - by Adam Driscoll
    I have a 2010 project that is targeting .NET v3.5. Inexplicably I can no longer build v3.5 projects. The project doesn't have ANY references added. It won't even let me add a reference to System.Core as it is added by the 'build system'. warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' IFilter.cs(82,49): error CS0433: The type 'System.Func' exists in both 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' Looks like something is grabbing onto 4.0 but I'm not quite sure how to fix it. Any one else run into this? Coworker had this same issue. It took a reinstall of Windows to correct the problem I've opened a bug on this one: https://connect.microsoft.com/VisualStudio/feedback/details/558245/warning-cs1685-when-compiling-a-v3-5-net-application-in-visual-studio-2010 If the compiler is set to verbose I see this: FrameworkPathOverride = C:\Windows\Microsoft.NET\Framework\v4.0.30319 which is defined as: Specifies the location of mscorlib.dll and microsoft.visualbasic.dll. This parameter is equivalent to the /sdkpath switch of the vbc.exe compiler. Some other interesting tidbits: I've created a new project all together and cannot build v3.5 at all. I can build 2.0, 3.0, 3.5 Client Profile, 4.0 and 4.0 Client Profile with no problem. VB.NET can build v3.5 but C# cannot. I've tried a reinstall of .NET 3.5, 4.0 and Visual Studio 2010 with no success. Visual Studio debug logs shown nothing interesting and Safe Mode does not work. Trying to avoid a Windows reinstall...

    Read the article

  • SVN (Subversion) Problem "File is scheduled for addition, but is missing" - Using Versions

    - by Mike
    I'm using Versions for SVN. I attempt to commit and get this message: Commit failed (details follow): '/Users/mike/Sites/mysite.com/astss-cvsdude/Trunk/cart/flashfile.swf' is scheduled for addition, but is missing I suppose this is because I had added files to the repo, and then deleted them via the filesystem. I'd like to have it simply make note of my change, and apply the change to the repo. How can I get around this?

    Read the article

  • Settings variable values in a Moq Callback() call

    - by Adam Driscoll
    I think I may be a bit confused on the syntax of the Moq Callback methods. When I try to do something like this: IFilter filter = new Filter(); List<IFoo> objects = new List<IFoo> { new Foo(), new Foo() }; IQueryable myFilteredFoos = null; mockObject.Setup(m => m.GetByFilter(It.IsAny<IFilter>())).Callback( (IFilter filter) => myFilteredFoos = filter.FilterCollection(objects)).Returns(myFilteredFoos.Cast<IFooBar>()); This throws a exception because myFilteredFoos is null during the Cast<IFooBar>() call. Is this not working as I expect? I would think FilterCollection would be called and then myFilteredFoos would be non-null and allow for the cast. FilterCollection is not capable of returning a null which draws me to the conclusion it is not being called. Also, when I declare myFilteredFoos like this: Queryable myFilteredFoos; The Return call complains that myFilteredFoos may be used before it is initialized.

    Read the article

  • Expression Tree Binary Expression for an 'In' operation

    - by Adam Driscoll
    I'm trying to build an expression tree (still) but getting further! I need to create a BinaryExpression to perform an 'In' comparison between a Member and a collection of items. Hence, the expression should return true if the member is contained within the items. This obviously does not exist: Expression.MakeBinary(ExpressionType.In, memberExpression, constantExpression); constantExpression is a ConstantExpression of type IEnumerable while memberExpression is a MemberExpression of type T. How would I create such an expression?

    Read the article

  • PowerShell - Shorten namespace names so it's easier to access types

    - by Adam Driscoll
    Is there a method of shortening PowerShell namespace references? Typing [RootNameSpace1.NameSpace2.Namepsace3+SomeEnum]::SomeValue is taxing and not a very good user expierence. I realize that you can reference System level objects without a namespace such that [Type]::GetType(... will work. Is there some manifest I could create or command I could use to shorten lengthy namespaces?

    Read the article

  • Repository - PHP

    - by Mike Silvis
    Hello, I am new to repositories and am currently looking around to find the best possible option. I need something that can handle multiple versions of our website, and allow multiple collaborators to all push to the repo together. Our current project is built in PHP, and we have a MySQL database. I am short on funding and need the best option for our money. I have limited ssh access to our server, however I have little to no experience working with repositories. Thanks, Mike

    Read the article

  • Joomla - template dissapearing

    - by Mike Silvis
    Hello, I have a Joomla Website located at http://www.MikeSilvis.com, and upon going to the site initially everything looks fine. However if you go into the site and click any link say web-design You can see that the default template is no longer being displayed. I have tried changing to a different template but that does not seem to help. Any help would be greatly appreciated. Thanks, Mike

    Read the article

  • Setting a PHP $_SESSION['var'] using jQuery

    - by mike condiff
    I need to set a PHP $_SESSION variable using the jQuery. IF the user clicks on an image I want to save a piece of information associated with that image as a session variable in php. I think I can do this by calling a php page or function and appending that piece of info to the query string. Any ideas. I have found little help through google. thanks mike

    Read the article

  • PowerShell Cmdlet Parameters and Inheritance

    - by Adam Driscoll
    I have an interface: public interface X {} I have a class: public class Y : X {} I have one cmdlet: [Cmdlet("Get", "Y")] public class GetYCmdlet : PSCmdlet { protected override void ProcessRecord() { WriteObject(new Y()); } } I have another cmdlet: [Cmdlet("Set", "X")] public class SetYCmdlet : PSCmdlet { [Parameter] public X SomeObj {get;set;} } When I do this: $y = Get-Y Set-X -SomeObj $y I get this: Could not convert "Y" to "X". Method not supported. Any ideas?

    Read the article

  • Expression Tree with Property Inheritance causes an argument exception

    - by Adam Driscoll
    Following this post: link text I'm trying to create an expression tree that references the property of a property. My code looks like this: public interface IFoo { void X {get;set;} } public interface IBar : IFoo { void Y {get;set;} } public interface IFooBarContainer { IBar Bar {get;set;} } public class Filterer { //Where T = "IFooBarContainer" public IQueryable<T> Filter<T>(IEnumerable<T> collection) { var argument = Expression.Parameter(typeof (T), "item"); //... //where propertyName = "IBar.X"; PropertyOfProperty(argument, propertyName); } private static MemberExpression PropertyOfProperty(Expression expr, string propertyName) { return propertyName.Split('.').Aggregate<string, MemberExpression>(null, (current, property) => Expression.Property(current ?? expr, property)); } } I receive the exception: System.ArgumentException: Instance property 'X' is not defined for type 'IBar' ReSharper turned the code in the link above into the condensed statement in my example. Both forms of the method returned the same error. If I reference IBar.Y the method does not fail.

    Read the article

  • Populating PHP list() with values in an array.

    - by Mike
    Hi, I have an array: $arr = array('foo', 'bar', 'bash', 'monkey', 'badger'); I want to have the elements in that array appear as the variables in my list(): list($foo, $bar, $bash, $monkey, $badger) = $data; Without actually specifying the variables, I tried; list(implode(",$", $arr)) = $data; and list(extract($arr)) = $data; But they don't work, I get: Fatal error: Can't use function return value in write context Does anyone have any idea whether this is possible? Cheers, Mike

    Read the article

  • IVsEditorAdaptersFactoryService.CreateVsTextViewAdapter throws an object null reference

    - by Adam Driscoll
    I'm trying to create a IVsTextViewAdpater with the IVsEditorAdaptersFactoryService but when I call CreateVsTextViewAdapter it throws an object null reference: var editorFactory = componentModel.GetService<IVsEditorAdaptersFactoryService>(); var serviceProvider = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)this; var view = editorFactory.CreateVsTextViewAdapter(serviceProvider); 'this' is a Microsoft.VisualStudio.Shell.Package implementation. Any ideas?

    Read the article

  • WPF Binding Collection To ComboBox and Selecting an item

    - by Adam Driscoll
    I've been knocking my head against this for some time now. I'm not really sure why it isn't working. I'm still pretty new to this whole WPF business. Here's my XAML for the combobox <ComboBox Width="200" SelectedValuePath="Type.FullName" SelectedItem="{Binding Path=Type}" Name="cmoBox" > </ComboBox> Here's what populates the ComboBox (myAssembly is a class I created with a list of possible types) cmoBox.ItemsSource = myAssembly.PossibleTypes; I set the DataContext in a parent element of the ComboBox in the code behind like this: groupBox.DataContext = listBox.SelectedItem; I want the binding to select the correct "possible type" from the combo box. It doesn't select anything. I have tried SelectedValue and SelectedItem. When I changed the DisplayMemberPath of the ComboBox to a different property it changed what was displayed so I know it's not completely broken. Any ideas???

    Read the article

  • Show Visual Studio's Source Control Merge Wizard programmatically

    - by Mike
    Hi, I'm developing a Work item Custom Control and I need to use the standard VS's Merge Wizard for items in source control from my code to allow to user choose the target branch, resolve conflicts etc. I'm pretty sure it's possible in some way (even through the reflection), but I just can't find the proper class in any of VS client assemblies (Microsoft.TeamFoundation.VersionControl.Controls.dll, Microsoft.TeamFoundation.VersionControl.Client.dll). Any help will be appreciated. Best regards, Mike

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >