Search Results

Search found 7 results on 1 pages for 'codesleuth'.

Page 1/1 | 1 

  • Safely delete a TFS branch project

    - by Codesleuth
    I'm currently reorganising our TFS source control for a very large set of solutions, and I've done this successfully so far. I have a problem at the moment where I need to delete a legacy "Release Branch" TFS project that was branched for the old structure, and is no-longer required since I now host a release branch within the new structure. This is an example of how the source control now looks after moving everything: $/Source Project /Trunk /[Projects] /Release /[Projects] $/Release Branch Project /[Projects] /[Other legacy stuff] So far I've found information that says: tf delete /lock:checkout /recursive TestMain to delete a branch. TfsDeleteProject to delete a project tf delete seems to be only relevant when I need to delete a branch that is within the same project as the trunk, and TfsDeleteProject doesn't seem like it will delete the branch association from the source project (I hope I'm wrong, see below). Can someone tell me if the above will work, and in what order I should perform them in, to successfully delete the TFS $/Release Branch Project while also deleting the branch association (from right-click $/Source Project - Properties - Branches)?

    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

  • 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

  • "SELECT TOP", "LEFT OUTER JOIN", "ORDER BY" gives extra rows

    - by Codesleuth
    I have the following Access query I'm running through OLE DB in .NET: SELECT TOP 25 tblClient.ClientCode, tblRegion.Region FROM (tblClient LEFT OUTER JOIN tblRegion ON tblClient.RegionCode = tblRegion.RegionCode) ORDER BY tblRegion.Region There are 431 records within tblClient that have RegionCode set to NULL. For some reason, the query above returns all these 431 records instead of the first 25. If I change the query to ORDER BY tblClient.Client (the name of the client) like so: SELECT TOP 25 tblClient.ClientCode, tblRegion.Region FROM (tblClient LEFT OUTER JOIN tblRegion ON tblClient.RegionCode = tblRegion.RegionCode) ORDER BY tblClient.Client I get the expected result set of 25 records, showing a mixture of region names and NULL values. Why is it that ordering by a field retrieved through a LEFT OUTER JOIN will the TOP clause not work?

    Read the article

  • Use LINQ to group a sequence by date with no gaps

    - by Codesleuth
    I'm trying to select a subgroup of a list where items have contiguous dates, e.g. ID StaffID Type Title ActivityDate -- ------- ---- ----------------- ------------ 1 41 1 Doctors 07/06/2010 2 41 0 Meeting with John 08/06/2010 3 41 0 Meeting Continues 09/06/2010 4 41 0 Meeting Continues 10/06/2010 5 41 3 Annual Leave 11/06/2010 6 41 0 Meeting Continues 14/06/2010 I'm using a pivot point each time, so take the example pivot item as 3, I'd like to get the following resulting contiguous events around the pivot: ID StaffID Type Title ActivityDate -- ------- ---- ----------------- ------------ 2 41 0 Meeting with John 08/06/2010 3 41 0 Meeting Continues 09/06/2010 4 41 0 Meeting Continues 10/06/2010 My current implementation is a laborious "walk" into the past, then into the future, to build the list: var orderedEvents = activities.OrderBy(a => a.ActivityDate).ToArray(); // Walk into the past until a gap is found var preceedingEvents = orderedEvents.TakeWhile(a => a.ID != activity.ID); DateTime dayBefore; var previousEvent = activity; while (previousEvent != null) { dayBefore = previousEvent.ActivityDate.AddDays(-1).Date; previousEvent = preceedingEvents.TakeWhile(a => a.ID != previousEvent.ID).LastOrDefault(); if (previousEvent != null) { if (previousEvent.ActivityDate.Date == dayBefore) relatedActivities.Insert(0, previousEvent); else previousEvent = null; } } // Walk into the future until a gap is found var followingEvents = orderedEvents.SkipWhile(a => a.ID != activity.ID); DateTime dayAfter; var nextEvent = activity; while (nextEvent != null) { dayAfter = nextEvent.ActivityDate.AddDays(1).Date; nextEvent = followingEvents.SkipWhile(a => a.ID != nextEvent.ID).Skip(1).FirstOrDefault(); if (nextEvent != null) { if (nextEvent.ActivityDate.Date == dayAfter) relatedActivities.Add(nextEvent); else nextEvent = null; } } The list relatedActivities should then contain the contiguous events, in order. Is there a better way (maybe using LINQ) for this? I had an idea of using .Aggregate() but couldn't think how to get the aggregate to break out when it finds a gap in the sequence.

    Read the article

  • Feeding PDF through IInternetSession to WebBrowser control - Error

    - by Codesleuth
    As related to my previous question, I have developed a temporary asynchronous pluggable protocol with the specific aim to be able to serve PDF documents directly to a WebBrowser control via a database. I need to do this because my limitations include not being able to access the disk other than IsolatedStorage; and a MemoryStream would be far better for serving up PDF documents that average around 31kb. Unfortunately the code doesn't work, and I'm getting an error from the WebBrowser control (i.e. IE): Unable to download . Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. The line in my code where this occurs is within the following: pOIProtSink.ReportData(BSCF.BSCF_LASTDATANOTIFICATION, (uint)_stream.Length, (uint)_stream.Length); However, if you download the project and run it, you will be able to see the stream is successfully read and passed to the browser, so it seems like there's a problem somewhere to do with the end of reading the data: public uint Read(IntPtr pv, uint cb, out uint pcbRead) { var bytesToRead = Math.Min(cb, _streamBuffer.Length); pcbRead = (uint)_stream.Read(_streamBuffer, 0, (int)bytesToRead); Marshal.Copy(_streamBuffer, 0, pv, (int)pcbRead); return (pcbRead == 0 || pcbRead < cb) ? HRESULT.S_FALSE : HRESULT.S_OK; } Here is the entire sample project: InternetSessionSample.zip (VS2010) I will leave this up for as long as I can to help other people in the future If anyone has any ideas why I might be getting this message and can shed some light on the problem, I would be grateful for the assistance. EDIT: A friend suggested inserting a line that calls the IInternetProtocolSink.ReportProgress with BINDSTATUS_CACHEFILENAMEAVAILABLE pointing at the original file. This prevents it from failing now and shows the PDF in the Adobe Reader control, but means it defeats the purpose of this by having Adobe Reader simply load from the cache file (which I can't provide). See below: pOIProtSink.ReportProgress(BINDSTATUS.BINDSTATUS_CACHEFILENAMEAVAILABLE, @"D:\Visual Studio Solutions\Projects\InternetSessionSample\bin\Debug\sample.pdf"); pOIProtSink.ReportData(BSCF.BSCF_LASTDATANOTIFICATION, (uint)_stream.Length, (uint)_stream.Length); This is progress though, I guess.

    Read the article

  • Pass a variable into a trigger

    - by Codesleuth
    I have a trigger which deals with some data for logging purposes like so: CREATE TRIGGER trgDataUpdated ON tblData FOR UPDATE AS BEGIN INSERT INTO tblLog ( ParentID, OldValue, NewValue, UserID ) SELECT deleted.ParentID, deleted.Value, inserted.Value, @intUserID -- how can I pass this in? FROM inserted INNER JOIN deleted ON inserted.ID = deleted.ID END How can I pass in the variable @intUserID into the above trigger, as in the following code: DECLARE @intUserID int SET @intUserID = 10 UPDATE tblData SET Value = @x PS: I know I can't literally pass in @intUserID to the trigger, it was just used for illustration purposes.

    Read the article

1