| Testing a web site Using Visual studio 2005 |
|
 |
Index ‹ Visual Studio ‹ Visual Studio Guidance Automation Toolkit
|
- Previous
- 1
- Windows Communication Foundation ("Indigo") dataContractSerializer with msmqIntegration?
I have basetype datacontract with knowntype attributes of subclass type marked. it has no problem work with netTCP, namePipe,msmqBinding, but it gives error with msmqIntegrationBinding.
Is it dataContractSerializer can't be appied to msmqIntegration due to the interop reason if so, how to pass around subclass types with msmqIntegrationBinding, any example
thanks
- 2
- 3
- Windows Communication Foundation ("Indigo") Error in WCF course demo code - where is Httpcfg
In the Microsoft Learning course Clinic 5137 : Introduction to Developing WCF & VS2005 I get the following error running the WCF Demo.
I go to the above link and it directs me to use the Httpcfg tool but I cannot find Httpcfg any where on this released version of Windows Vista.
With Windows Vista is it better to develop on another platform, i.e. Win 2003 and then deploy to Windows Vista Or do I just need to get this tool on my copy of Windows Vista
Thanks
- 4
- Visual Studio MSBuild How to get Razzle?
I am working on WDM driver and now using WDK RC2 got from Windows Connect. I suffer a problem when I use prefast test to check my driver code.
From the feedback of MS, it has to use Razzle Window to get some more debug information. But Razzle seems an internal debug tools and is not available to the public.
Does anyone know how to get it
- 5
- Visual Studio Tools for Office AddIn App PathWe used to use System.Reflection.GetExecutingAssembly().Location to obtain the path to our Excel 2003 addin. In VSTO 2005 for Excel 2007 this is returning something like;
"C:\Documents and Settings\chrish\Local Settings\Application Data\assembly\dl3\Q0G97ZAE.ZN2\D7ZDXCJ1.7DR\63345ad5\54a51f05_b4fbc601\".
I've changed the code to instead use System.Reflection.GetExecutingAssembly().CodeBase. Would this be the correct method for VSTO 2005
- 6
- Windows Presentation Foundation (WPF) SpotLight in WPF cann't form a circle of light?
Hi! Guys,
I have a problem. When I use a spotlight in the 3-D scene to light a side
plane of a cube ,the result is not a circle light effect.
<Viewport3D ClipToBounds="True" Width="150" Height="150" Canvas.Left="0"
Canvas.Top="10">
<!-- Defines the camera used to view the 3D object. -->
<Viewport3D.Camera>
<PerspectiveCamera Position="0,0,2" LookDirection="0,0,-1"
FieldOfView="60" />
</Viewport3D.Camera>
<!-- The ModelVisual3D children contain the 3D models -->
<Viewport3D.Children>
<!-- A SpotLight is used to light the scene. The InnerConeAngle
and OuterConeAngle are used
to control the size of the light cone created by the
SpotLight. The Direction and Position
properties determine where the SpotLight is pointing in the
scene. In this example, the Position
of the SpotLight is set so that the SpotLight is only
illuminating the upper right-hand corner
of the 3D object. -->
<ModelVisual3D>
<ModelVisual3D.Content>
<SpotLight x:Name="mySpotLight" InnerConeAngle="15.0"
OuterConeAngle="22.0" Color="#FFFFFF" Direction="0,0,-1"
Position="0,0,5" Range="30"/>
</ModelVisual3D.Content>
</ModelVisual3D>
<ModelVisual3D>
<ModelVisual3D.Content>
<GeometryModel3D>
<!-- The geometry specifes the shape of the 3D plane. In
this sample, a flat sheet is created. -->
<GeometryModel3D.Geometry>
<MeshGeometry3D
TriangleIndices="0,1,2 3,4,5 "
Normals="0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 "
TextureCoordinates="0,0 1,0 1,1 1,1 0,1 0,0 "
Positions="-0.5,-0.5,0.5 0.5,-0.5,0.5 0.5,0.5,0.5
0.5,0.5,0.5 -0.5,0.5,0.5 -0.5,-0.5,0.5 " />
</GeometryModel3D.Geometry>
<GeometryModel3D.Material>
<MaterialGroup>
<DiffuseMaterial>
<DiffuseMaterial.Brush> <SolidColorBrush
Color="Blue" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</MaterialGroup>
</GeometryModel3D.Material>
</GeometryModel3D>
</ModelVisual3D.Content>
</ModelVisual3D>
</Viewport3D.Children>
</Viewport3D>
- 7
- 8
- Visual Studio Report Controls Testing for Null in RDLC Report Field
In .net 2.0, vb.net, I am trying to display a strPhCell phone number char field, from a DataSet, using the Format() function. The Format works fine, but whenever there is NO Phone Number, the string "#error" displays on the report. I have tried every way I can think of to detect a Null or blank, but nothing works. Someone on ExpertExchange suggested the following ... which also does not work if there is no phone number. Can someone help
=IIF (Fields!strPhCell.Value is nothing, nothing, Format(cdec(Fields!strPhCell.Value),"(###) ###-####") )
cgai
- 9
- 10
- Visual Studio Setup and Installation Brace Highlighting and BackgroundI actually just installed VStudio 2005 and am editing C++ code and the only brace highlighting I get is when I type a new } , but it matches in black that is really hard to determine between it and a regular one, there is no option to set the background, only the brace color. Also, is there a way to make it match just by clicking next to the }
- 11
- Windows Presentation Foundation (WPF) Filter Inner List Property
Hello,
I have done a test to see how WPF is handing entity binding and it working great. Much better than WinForms.
I have create a class call Mission with property Name and a property Tasks of type IList<Task>.
I also create a Task class which have Name and Legnth.
Now, I have created two missions with few tasks in each of them. The missions are stored in List<Mission>. I have bound the mission list to an ItemsControl and set its ItemTemplate to Expander. The Expander header is bound to the mission's name. I then create an inner ItemsControl inside the missions control which have its ItemsSource property bound to the Tasks property. Inside the inner ItemsControl I put a TextBlock which bound to the task's name.
Everything is working great.
My question is this: I want to filter both the missions I see and the tasks I see. Filtering the mission is easy by using CollectionView.
How can I filter the tasks based on thier length and still use binding
Thank you very much,
Ido.
- 12
- 13
- Visual Studio MSBuild MSBuild NewBie question
Hi,
I just have two problems with MSBuild and wonder if somebody can help me.
1. I'm trying to incorporate NUnit tests with MSBuild, so I try the following:
<ItemGroup><TestAssembly Include="Scheduler.Service.Test.dll"> <WorkingDirectory>build\test\</WorkingDirectory> </TestAssembly></ItemGroup>
and then in task I used MSBuild Community Task:
<Target Name="UnitTest"> <NUnit ContinueOnError='true' Assemblies="@(TestAssembly)" WorkingDirectory="%(WorkingDirectory)" ToolPath="build\test\" /> </Target>
Now I want to make a test with a group of assembles, so I tried <TestAssembly Include="*.Test.dll">
However, in this case, it cannot found any of the dll because of the working directory. But if I delete the working directory, I cannot get the nunit run probably. Any suggestion for this problem
2. I'm also trying to do <replacetoken> from an xml file like NAnt like the <filterchain>. I looked up the net and find the <updatefile> attribute in the Community Task useful.
However, is there a way that you could include an xml file in the msbuild and load all the local properties in
Something that will do
<include buildfile="local.properties.xml" />
Thank you very much for the help in advance,
Cheers,
Joshua
- 14
- 15
- Visual Studio Tools for Office Checking if excel file exists before opening
I'm writing a program in C# that will open and manipulate an excel file. However, I will need to check if the file exists BEFORE I attempt to open it. Here is what I have...
Microsoft.Office.Interop.Excel. Application xlApp = new Microsoft.Office.Interop.Excel.Application();
xlApp.Visible = false;
Workbook wb = xlApp.Workbooks.Add(@"C:\test.xls");
How can I check to see if text.xls exists before I open it
Thanks :)
|
 |
Index ‹ Visual Studio ‹ Visual Studio Guidance Automation Toolkit |
- Next
- 1
- 2
- Visual Studio Extensibility Can I create ModelDocData and ModelDocView from the model domain class?
I serialized my model doing something like this:
SerializationResult sr = new SerializationResult();
UseCaseSampleSerializationHelper.Instance.SaveModelAndDiagram(sr, obj1.ModelRoot, @"C:\TEMP\MODEL.XML", obj2.Diagram, @"c:\temp\model.diagram");
This work fine, after i want to deserialized the model and show it on one designer, but i haven’t any file ".diagram" on the solution explorer, only I have the model load on the store:
SerializationResult sr = new SerializationResult();
UseCaseModel result=null;
Store store = new Store();
Type[] modelTypes = new Type[] {
typeof(Microsoft.VisualStudio.Modeling.Diagrams.CoreDesignSurfaceDomainModel),
typeof(Microsoft.Example.UseCases.UseCaseSampleDomainModel)
};
store.LoadDomainModels(modelTypes);
UseCaseSampleDiagram d=null;
using (Transaction t = store.TransactionManager.BeginTransaction("Reading diagram")) {
result = UseCaseSampleSerializationHelper.Instance.LoadModelAndDiagram(store, @"C:\TEMP\MODEL.XML", @"c:\temp\model.diagram", null,null);
t.Commit();
}
How can i do for create a Document and show it
Thanks.
- 3
- 4
- 5
- 6
- Windows Presentation Foundation (WPF) TreeView and several HierarchicalDataTemplate
I have two HierarchicalDataTemplates for TreeView :
< HierarchicalDataTemplate DataType="Person" ItemsSource ="{Binding XPath=*}" x:Key="BriefTemplate">
< HierarchicalDataTemplate DataType="Person" ItemsSource ="{Binding XPath=*}" x:Key="FullTemplate">
My questions are:
1. <TreeView ItemTemplate="{StaticResource BriefTemplate}" ItemContainerStyle="{StaticResource VerticalTreeItem}" Name="myTreeView" ItemsSource="{Binding Source={StaticResource FamilyTree}, XPath=*}" >
It doesn't work,I get the error : "cannot find resource BriefTemplate". How should I write resource for ItemTemplate
2. In Button Click event I want to change one HierarchicalDataTemplate to another. How should I do it
Thanks for advance.
- 7
- Visual Studio Tools for Office Display HTML text in Word (with VSTO)Hi,
I would like to tell Word to interpret some text in HTML form and display only the resulting text well-formated.
Here some code: Word.Range range = Range(ref missing, ref missing); range.Text = "Some normal text"; range.Bold = 1; range.InsertAfter("\n\n"); range.Collapse(ref collapseEnd);
// now the html part range.Text = "<span class="A21">This is some html content</span>" ; range.InsertAfter("\n\n");
The second part of the code displays the HTML tags instaed of interpreting it as html. Any idea how I can fix this
Thanks a lot for any help. Claudia
- 8
- Developer Documentation and Help System Sandcastle - Links to inherited framework members not working on my system.
Hello All,
I would appreciate some feedback on the following issue I am having with the latest version of Sandcastle. I am either doing something wrong or there would appear to be an issue with the latest sandcastle release.
When I use sandcastle ( latest release ) to generate a help 2.0 .HXS file I have noticed that when I integrate it into Visual Studio 2005 - using the help integration wizard supplied in the SDK - I seem unable to get to inherited members from the Framework when I click on them. When I look at my classes they contain inherited members like GetType(), Equals(Object) which are all inherited from the Object() class. When I click on them I get a page displayed saying "Information not found". I am sure on previous versions of sandcastle this used to work. I have had a look at the references in the help file and in the case of GetType() - which is inherited from Object() - it seems to contain references which looks quite a bit different to links which work in the existing visual studio 2005 help. In the resolve reference links of sandcastle.config file I have the "index" type set for the cpref_reflection:
<!-- resolve reference links --> <component type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent" assembly="..\..\ProductionTools\BuildComponents\BuildComponents.dll"> <targets files="reflection.xml" type="local" /> <targets files="..\cpref_reflection\*.xml" type="index" /> </component>
If I set the cpref_reflection type to "msdn" it correctly access the internet to show me details of the inherited member, it is just the setting the type to "index" does not appear to work. I am sure on previous versions of Sandcastle, when I clicked on an inherited framework member to give its details my from visual studio help files installed on my system.
If I view the source of an inheritied framework member like GetType() in the .HXS I have generated using Sandcastle it seems to have the following code which does not look right:
<td><mshelp:link keywords="GetType" tabindex="0" xmlns:mshelp="http://msdn.microsoft.com/mshelp">GetType()</mshelp:link></td><td><div class="summary">Gets the <mshelp:link keywords="Type" tabindex="0" xmlns:mshelp="http://msdn.microsoft.com/mshelp">Type</mshelp:link> of the current instance.</div> (Inherited from <mshelp:link keywords="Object" tabindex="0" xmlns:mshelp="http://msdn.microsoft.com/mshelp">Object</mshelp:link>.)</td>
I would appreciate any help on this matter as I am need to get this working as I would like to use Sandcastle to document my code.
Michael
- 9
- Windows Presentation Foundation (WPF) Clipboard Problem
Hi there
I seem te be having a problem when placing images on the clipboard. It only seems to be a problem when the code is executed on a Virtual PC and I suspect it has something to do with graphics memory, but I am not sure, and I was hoping that perhaps someone will know of a better way to accomplish this.
Here is some info on the app. We have an avalon design canvas on which all kinds of objects are placed. Later on the user can then select an area of this design canvas and "grab" a bitmap image of the selection. This bitmap image is placed on the clipboard from where it can be pasted into other applications as normal images.
Here is the code that takes, as input, a FrameworkElement, makes a bitmap out of it an returns the sub-selection inside it as a bitmap image:
public static System.Drawing.Bitmap GetWin32BitmapFromUIElement(System.Windows.FrameworkElement element, System.Windows.Rect regionInsideElement)
{
MemoryStream fs = new MemoryStream();
System.Windows.Media.Imaging. RenderTargetBitmap bmp = element.ActualHeight > 0 new RenderTargetBitmap((int)element.ActualWidth, (int)element.ActualHeight, 1 / 96, 1 / 96, System.Windows.Media.PixelFormats.Pbgra32) : new RenderTargetBitmap((int)element.Width, (int)element.Height, 1 / 96, 1 / 96, System.Windows.Media.PixelFormats.Pbgra32);
bmp.Render(element);
PngBitmapEncoder encoder = new PngBitmapEncoder();
encoder.Frames.Add( BitmapFrame.Create(bmp));
encoder.Save(fs);
System.Drawing. Image img = System.Drawing.Image.FromStream(fs);
System.Drawing. Bitmap final = new System.Drawing.Bitmap((int)regionInsideElement.Width-1, (int)regionInsideElement.Height-1);
System.Drawing. Graphics g = System.Drawing.Graphics.FromImage(final);
g.DrawImage(img, new System.Drawing.RectangleF(0, 0, (float)regionInsideElement.Width, (float)regionInsideElement.Height), new System.Drawing.RectangleF((float)regionInsideElement.Left, (float)regionInsideElement.Top, (float)regionInsideElement.Width, (float)regionInsideElement.Height), System.Drawing.GraphicsUnit.Pixel);
fs.Close();
return final;
}
After this, the resulting Bitmap object is placed on the clipboard:
System.Windows.Forms. Clipboard.Clear();
System.Drawing. Bitmap bmp = Utilities.GetWin32BitmapFromUIElement(this as FrameworkElement, areaToGrab);
System.Windows.Forms. Clipboard.SetImage(bmp);
bmp.Dispose();
bmp = null;
It is this code that causes the "Requested Clipboard Operation did not succeed" error on Virtual PCs.
Any ideas
- 10
- Visual Studio Source Control and SourceSafe VSS 6.0 Command line
Hi,
I'm working with VS 2005 and VSS 6.0.
I've build a small .cmd file that clean some folders, build the solution (using devenv.exe) and deploy files to a specific folder.
I'd like to add a first step in my bat file which is "get latest version of the project files with user USER password PASS and without overriding checked out items".
I've started to look into the documentation of ss.exe, but it's quite complex and I didn't get success.
Does anyone have the right command line for me
Thsnk in advance,
Steve
- 11
- Visual Studio Tools for Office in my vb.net windows application i need to open the ms outlook adress book
in my vb.net windows application i need to open the ms outlook adress book
in my windows application i am preparing an email application in my compose an email form i need to access the email id's from the adress book of the system
i kept a button and an text box when i click on the button i should be able to open the adressbook and select the email id in the adress book and this email id should get aded in the text box
can any one help me plz
- 12
- Visual Studio MSBuild using of ILogicalThreadAffinative
when i using this interface
this error ....
Error 28 The "GenerateResource" task failed unexpectedly. System.Runtime.Serialization.SerializationException: Type is not resolved for member 'RAD.Infra.Contexts.InfraContext,RAD.Infra.Contexts, Version=1.0.1.1, Culture=neutral, PublicKeyToken=3f5c254063a54fe2'. at System.AppDomain.CreateInstanceFromAndUnwrap(String assemblyName, String typeName) at Microsoft.Build.Tasks.GenerateResource.Execute() at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound) RAD.TVTO.Plan.UI
- 13
- Windows Presentation Foundation (WPF) Reflection based loading of Ressources
Hi. I am building a small test framework for loading and instantiating XAML views. I have got a problem with Reflection and loading of XAML ressources.
A. I Load an Assembly: .... a= Assembly.LoadFile("myassembly");...
B. I would then like to load the XAML ressources in that Assembly into the current Applications Ressource Dictionary, (Merged), something like this:
uri = new Uri("pack://application:,,,/MyAssembly;component/Resources/SomeResource.xaml"); rd = new ResourceDictionary(); rd.Source = uri; Application.Current.Resources.MergedDictionaries.Add(rd);
When I use the methods: GetManifestResourceNames / GetManifestResourceStream / GetManifestResourceInfo on the assembly, I get the embedded ressources by name, something like: 'MyAssembly.g.resources', but what I would like to obtain, is the name 'SomeResource',in order to load the ressource into the Application Dictionary.
I hope someone has got an idea.
- 14
- Visual Studio Extensibility IVsTextMarkerClient multi-level context menuIs it possible to create multi-level menu items from a IVsTextMarkerClient (perhaps inside the GetMarkerCommandInfo method)
The sample code below adds one menu item for each item in the pointcuts
array, but I would like to add only one menu item with each array
element as sub menu items.
public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf)
{
if (pbstrText == null)
{
return VSConstants.S_OK;
}
uint
flags =
(uint)(Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_SUPPORTED |
Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_ENABLED);
if (iItem < pointcuts.Length)
{
pbstrText[0] = pointcuts[iItem].ToString();
pcmdf[0] = flags;
return VSConstants.S_OK;
}
return VSConstants.S_FALSE;
}
- 15
- Windows Presentation Foundation (WPF) How to create DynamicResource in code?
Hi all,
I have a program to play slideshow. All images are imported in run-time than use XmlWriter to save. Likes below.
....
<Grid.Resources> <BitmapImage UriSource="20040714_lsps9140723_20213.jpg" x:Key="Bitmap1" /> <BitmapImage UriSource="20051010_ak0674661_030324.jpg" x:Key="Bitmap2" /> </Grid.Resources> ....
<DrawingCollection > <ImageDrawing ImageSource ="{DynamicResource Bitmap1}"/> <ImageDrawing ImageSource ="{DynamicResource Bitmap2}"/> </DrawingCollection >
My question is, How to create ImageSource ="{DynamicResource Bitmap1}" in code
Thanks.
|
|
|