Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Were are the ascx files used in custom visual webparts in the 15 hive?

They used to be in the controltemplates\%project% folder.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

If you are talking about creating custom visual webparts, the ascx file will not be in the 15 hive as it was in SP2010, the ascx is generated by the webpart's dll when the code is executed, it's not going to be available in the 15 hive.

share|improve this answer
    
I opened the wsp and sure enough it seems like they are indeed MIA. I hate this! I would do a quick xcopy deployment while working out UI issues. Now I have to waste hours a week with build then deploys. Automated or not this takes way longer than copying one few k file. –  Joe Johnston Aug 23 '13 at 19:07
    
@JoeJohnston Have you reached to any workaround this issue as it is really wasting a lot of time? –  Hossam El-Deen Nov 11 '13 at 12:45
    
The physical files do not exist. I think they are assimilated into metadata. –  Joe Johnston Nov 12 '13 at 13:30
add comment

They are in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES

share|improve this answer
    
I cleared up my question to specify ascx files from custom visual web parts. –  Joe Johnston Aug 23 '13 at 19:01
add comment

The *.ascx is converted to code using the custom tool "SharePointWebPartCodeGenerator". This tool generates the MyWebPart.ascx.g.cs (for C#; I guess in VB it will be *.ascx.g.vb) that contains several BuildControl-methods. The BuildControl-methods will be executed by the BuildControlTree that also contains additional Content (e.g. like JavaScript or "normal" HTML output).

Therefore, the ascx file itself is not necessary and will not be deployed. If you want short development cycles, you can use tools like CKSDev that allow a quick deployment of the compiled assembly to the GAC (without deploying the whole solution). This is not as fast as editing and copying the ascx-file, but it is faster than waiting for the whole solution to be deployed by SharePoint.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.