I am getting a warning for WMAppManifest.xml file after i added a background agent task.
My xml is:
<ExtendedTask Name="BackgroundTask">
<BackgroundServiceAgent Specifier="ScheduledTaskAgent" Name="MyAgent" Source="MyAgent" Type="MyAgent.ScheduledAgent" />
</ExtendedTask>
Background Agent Class file name - ScheduledTaskAgent
Background Agent Assembly name - myAgent
Background Agent Default namespace - myAgent
Can anyone point out the error? Thanks in advance.
I found the solution. This might help those who have been stuck at the same problem.
Steps:
Create a Background Agent using the Template in Visual Studio.
In the main project, right click on solution and select add existing project
Then right click on main project, click on Add Reference, go to second tab 'Projects' and select the background agent.
The third step is the main step. I missed out on that step and hence the issue.
The entry in WMAppManifest.xml will be automatically created.
this will probably sound strange but try to change name of background agent class to something else, e.g. ScheduledAgent. I think you might have name conflict there.
Related
I am a newbie and not also good in explaning but i will try my best I hope you understand so here it is. Im trying to create application.exe with ms access database at first it works login and searching but when i try to edit or enter another data using my application.exe this happen operation must use an updateable query but when im not using .exe app no problem show
This is the step by step That i do when executing my app. why did i include this maybe, I don't know and I'm not really sure that the cause of the problem is the way of my executing the application. By the way this is my connection string that I use
Public cn As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\DB_HR.accdb;Jet OLEDB:DATABASE PASSWORD=dbhr123;")
Step 1. I put my database the bin/debug
Then
Step 2. I add my data base Solution Explorer
Step 3.I go to the properties of my DB_HR.accdb by right cliking and change the Copy to output Directory to Copy if newer like this
Step 4. I build the windows app just like i do in this picture
Step 5.I change my app.manifest code requestedExecutionLevel level="asInvoker" uiAccess="false" into highestAvailable just like this
Step 6. I use Setup Wizad to create my executable application. and I add this Files and then I created a
shorcut for my WindowsApp1.exe just like i do in this picture then drag it into user's Desktop Then in the Build menu I click the batch build to create the .exe app
But the problem is still The same operation must use an updateable query
Can you help me please.What should I Do? Thanks in advance
I Found a solution. Try to check your App.config Solution Explorer and Open it.
If the code look like this then You should Add this code then save it.
Then try to execute your program.
I'm having trouble adding user controls to my project.
I right-click on my project and select Add -> User Control...
I then click Add
I drag a label onto the new user control, and save it.
I build the project, go back to my main form, and drag the control from the Components tab in the Toolbox onto the form.
I see the control, but I get an error:
Type 'crm.UserControl1' is not defined.
If I do this with a blank project, it works. I'm not familiar enough with vb.net or visual studio to understand what's going wrong.
If I double-click the error, it brings me to this line in the generated designer code for the form:
Me.UserControl11 = New crm.UserControl1()
and says that crm.UserControl1 is not defined. If I change it to Global.crm.UserControl1, it works, but obviously this code is overwritten when I fiddle with the designer.
Any ideas, or pointers to get me started in the right direction? Thanks in advance.
My main form had the same name as the root namespace. This is what caused the problem.
Kind of late to the party with this one but I had this problem and I think that the issue was due to the controls being built in a more recent framework than the one that I was using.
Basically my custom controls were built in 4.7, but my project was being built in 4.5.1
Once I changed the current build so that they both were the same it compiled happily.
As far as I know, it is kind of accessibility issue because you are able to solve the issue when you try to access the object globally. I think when you drag and drop the control, the definition codes of the control in the designer class automatically generated with private accessibility but I don't know why. You could try to change it as public. I hope this will work.
Way late to this party. I fixed it by referencing it in the aspx page with the following as it was missing.
<%# Register Src="~/Controls/mycontrolname.ascx" TagPrefix="ucControl" TagName="MyControl" %>
I recently have encountered a weird issue with my project: as soon as I click debug and it builds the project, it stops debugging. There isn't any error message, or anything else that comes up, including the form itself.
I've tried messing with the settings: no splash screen and I've even changed the startup form to a blank Windows form. What could be causing this problem? Is it Visual Studio or my code?
Probably your program is exiting normally. Set a breakpoint at the first statement to be executed, press F5, then single-step through the program until you get to the last statement executed.
If the first statement is never reached, then one of two things probably happened:
You're mistaken about which statement is executed first, or
The program is terminating during initialization, probably because a class constructor is exiting the program either normally or abnormally.
A few ideas:
Use Debug->Exceptions, and check all the checkboxes so you break when an exception is thrown.
Use Debug->Step into to step into your code.
Then you can use Step Over and Step Into (look at the menu for the keyboard shortcuts)
I found a solution, but not the problem.
How I fixed it:
I just created a template for each form, created a new project, and imported everything into the new project. One thing that I found useful is in the new project is to add an existing item (CTRL + D), and group select (maybe, don't know if you can) and select all the non-code/form/designer/etc. files (like text files or images) and then import them.
I have found a possible solution after I had the same problem.
You probably have more than one project in your solution (The main project, plus an "InstallShield" project",perhaps)
Make sure you have the main project set up as "Startup Project".
In the Solution Explorer, right click on the Main Project and select "Set as Startup Project".
Everything will then run OK.
If you get the error like: "The debug mode is program but there is no program specified....." Go to Solution Explorer then Right Click on main project's name and Click on Set as StartUp project. You can debug your program.
I am trying to debug my VB.net app in Visual Studio Express 2010, when I realized my changes will not update on my form-on the designer or in the code. After looking online, I found that you should clear out the "Debug" folder under the bin. That worked-for only one time. Now it went back to the older version and when I delete it again, it doesn't change. When I build the project and run it from the "Release" folder, it works perfectly, but when a error occurs at runtime, it won't show where the error is because it is running independently.
Thanks in advance.
(I have Windows XP SP3)
I had the same problem. Frustrating problem....? Close the project, go to debug bin/folder, delete these files, reopen project and rebuild it (F5).
- .exe
- .pdb
- .vshost.exe
- .vshost.exe.manifest
- .xml
it works 99.99%.......thanks
Before I'd create a new project, I'd copy all of the code-behind (including the code that creates the controls that you're not supposed to touch) into another form. That may be all you need to do. Try compiling that form and running it and see if it's good. If so, you won't have to create a whole new project and can just delete the old form.
I would think there's something causing this that would be much easier to to fix. Are there any config files or anything like that? Are you building to the right location?
It's been a while since I've done winforms, but I remember this happening in VS 2005 and I just created a new form and copied the code-behind into another winform and compiled.
Hope this helps.
mmm... if it was for me, with such a weird bug, i would create a new project then insert the files (not as a link, but a copy) in the project, and i most likely all will work fine after... Faster than finding where-the-hell is that wrong parameter...
So how do you do that ? Well create a new project, choose the folder and name, change namespace in settings if needed, then in project explorer Add existing item, then Browse and select your code and xaml (and other maybe) files. Let us know.
This happened to me as well. I believe the /bin and /obj folders of my application must've been locked for by some other application. Before manually deleting them I tried running Visual Studio as an administrator and did a Clean and a Rebuild which worked. If it doesn't work for you, try deleting the folders manually.
Close VS
Press Ctrl + Alt + Delete
Choose "Task Manager"
In the "Process" tab in "Task Manager" find your "ProjectName.EXE" and click "End Task"
Restart VS
I have the same problem, but i changed the solution config next to the start button from debug to release and that fixed my problem, try it :)
"Save all" works for me in VS 2010 VB, in Debug and Release mode.
I put the "Save all" icon next to the Run and Build icons.
First make sure your Localizable Property of you form is set to FALSE
I realize that I can just make sure I don't have the service open in my active window when I start debugging, but that's a little annoying. It seems like there's got to be some setting in VS2010 somewhere to turn this off.
For anyone who asks "why would you want to turn it off?", it's because the service is using both SOAP and ReST. I test ReST in browser or in Fiddler and test SOAP in SOAPUI, and really don't have a need for it.
Thanks.
This is particularly frustrating. I am running VS2010, and cannot locate Properties/Debug tab as most posts reference. However, if you
Right-click Unload Project
Right-click Edit
Find EnableWcfTestClientForSVCDefaultValue and set its value to False
<EnableWcfTestClientForSVCDefaultValue>
False
</EnableWcfTestClientForSVCDefaultValue>
Save, and right-click Reload Project
Should work.
Not sure why this version of VS2010 does not display Debug tab.
Select Menu-><Project Name> Properties.
In the properties window, click on the "Debug" tab in the left hand column. In the Start Options section in the Command Line Arguments box, you should see the following:
/client:"WcfTestClient.exe"
Remove that and save the changes.
You might want to also uncheck the "Start WCF Service Host when debugging another project in the same solution" checkbox in the WCF Options tab.
If it is a web site project(VS2010) right click project. Select Properties Window(F4). You should see a property grid of the properties window. There choose False for Always start when debugging. This solved the problem for me.
I am using VS2015 and I faced the similar problem. I tried the below steps and it is resolved.
1,Right-Click the project properties
2,Go to Web tab
3,Check the option Current page is selected. If not selected then select it.
In VS2019 this has moved to the <Project_name>.User project file that holds user's preferences are usually outside of source control.